Different from Queue, a Topic implements a publishing/subscription model. In the following example, two consumers are started to listen to a Topic, then, multiple messages are repeatedly sent to the Topic.
Import javax. jms. Connection;Import javax. jms. JMSException;Import javax. jms. Message;Import javax. jms. Messag
In the following example, two queue are created, and the sender sends a message to one queue. After receiving the message, the receiver replies a message to the other queue, then create a consumer to receive the reply message.
Import javax. JMS. connection;Import javax. JMS. jmsexception;Import javax. JMS. message;Import javax.
1. Basic concepts of JMS 1. JMS (Java Message Service) is a standard API used to access the enterprise message system. It facilitates message systems.Java applications in the system exchange messages, and simplify the development of enterprise applications by providing standard interfaces for generating, sending, and receiving messages.
2. Basic JMS FunctionsJMS
As it is, continue to improve the J2EE technical specifications. This time, we will write a JMS program. Understand the message-oriented middleware definition: Message
(1) message is a programmable mechanism for communication between two ends
(2) Some messaging technologies such:
TCP/IP sockets
MPs queue
File
Shared storage
Asynchronous Message:
(1) asynchronous message:
It is better to use asynchronous messages for Syn
Introduction to JMS
JMS (Java Message Service ). It is used to transmit messages between applications.
Enterprise Message
WebSphere MQ, SonicMQ, Microsoft Message Queue (MSMQ), ActiveMQ, Message Bean in EJB, and ESB (Enterprise Message Bus) in SOA are all Enterprise messages.
Enterprise Message can be used in the following ways:
Centralized
Distributed
Hybrid
Install a Daemon program on each Client. T
Today, most computing environments are made up of different platforms rather than sticking to any platform. The Java Messaging Service (JMS), together with Extensible Markup Language (XML), satisfies the desire for this heterogeneous environment integration. This article demonstrates how to use JMS to create xml-based messages and distribute them equally to Java and non-Java applications.
After several yea
:
Non-underlying operating system software, non-business application software, not directly to the end user, not directly to the customer value of the software collectively referred to as middleware.
What is message middleware:
Focus on sending and receiving data and integrating distributed systems with efficient and reliable asynchronous message delivery mechanisms
Message Middleware Flowchart:Speaking of message middleware has to mention the
deeper understanding of the needs of distributed systems. Emerging Technologies (like Java and. NET) already contains code distributions as part of their basic programming model. By doing so, these technologies have incorporated high availability and fault tolerance into messaging, while encouraging vendors offering solutions to deliver systems that consider performance on a wider range of issues.
Our company has recently been asked to implement a solution for file distribution and replication
Introduce an article first: http://www.javaworld.com/javaworld/jw-01-2009/jw-01-spring-transactions.html?page=1
But it's a little long, and now I've forgotten what I said. Pay attention to the comments, which refer to the content of the article is wrong.
In spring, if there are both JMS operations and DB operations, there are probably three ways:
1. No use of JTA. JMS not in transaction, DB operation in tra
Recently, you want to learn about JMS and then learn about ACTIVEMQ, which is recorded here.1.ActiveMQ Introduction
ACTIVEMQ Official website: http://activemq.apache.org/
(The following excerpt from Baidu Encyclopedia)
ActiveMQ is the most popular, powerful, open source messaging bus that Apache has produced. ActiveMQ is a JMS provider implementation that fully supports the JMS1.1 and the Java EE 1.4 specif
Implement point-to-point message transmission of JMS Based on Tomcat + JNDI + ActiveMQ
I wrote a simple JMS example. The reason for using JNDI is for universality. This example uses the common interface provided by the JMS specification and does not use the interface of a specific JMS provider, this ensures that the pr
JMS (Java Message Service). Used to pass a message between application.Enterprise MessageWebSphere MQ, SONICMQ, Microsoft message Queue (MSMQ), ActiveMQ, Message Bean in EJB, ESB in SOA (Enterprise message Bus) and so on are enterprise Message.When you use enterprise message, you have the following options:Centralized typeDistributedMixed typeA daemon program is installed on each client, the client and daemon use TCP communication, and multicast is us
In the real enterprise, the application of message communication has been very hot, and plays a special role in the enterprise application of the Java EE, so it is very necessary to study it.
On the basic concept of JMS (i) –JMS, we introduced the canonical JMS of message communication, and this blog post introduces an open source
First, the basic configuration1 Add Oracle driver file, Ojdbc6.jar, cannot use less than this version of the JDBC driver, jboss-4.2.3.ga\server\default\lib2 Increase Retrotranslator-runtime-1.2.3.jar,jboss-4.2.3.ga\server\default\lib3 Configuring the data sourceJBOSS-4.2.3.GA\SERVER\DEFAULT\DEPLOY\JMS Increase Oracle-ds.xml4 Configuring the JMS environment for JBossCopy JBOSS4.2.3\DOCS\EXAMPLES\
JPA
Java persistence API.
JPA uses JDK 5.0 annotations or XML to describe the ing relationship between objects and Relational Tables, and persistently stores object objects in the database at runtime.
Baidu Encyclopedia: http://baike.baidu.com/view/1036852.htm
JTA
Java transaction API, translated as Java transaction API.
JTA allows applications to execute Distributed Transaction Processing-accessing and updating data on two or more network computer resources. The JTA support of the JDBC driver
allow the delivery of objects, the RPC service message is represented by the external data representation (External data representation,xdr) language.In addition, the one thing that RMI outperforms RPC or SOAP is that errors caused by object or method mismatches during program development can be discovered at compile time without waiting for the run time.###########################Note: Another article describes the difference between RPC and RMI:The RMI underlying protocol is the TCP/IP;RPC un
In recent years, developers have been able to get more extensive enterprise Message Queuing (MQ) products. Proper use of MQ technology can often improve the organization, performance, and scalability of your application. The Java Messaging Service (JMS) is part of the integration into Java EE, which enables MQ services to be used by any Java EE application. In this article (also the first part of this column series), Brian outlines some of the benefit
returns the processing result. Sample Configuration
encoding= "UTF-8" disabletransporttransformer= "false" exchange-pattern= "Request-response" doc:name= "TCP"
Doc:description= "The TCP transport enables events to being sent and received over TCP sockets."/>
encoding= "UTF-8" disabletransporttransformer= "false" exchange-pattern= "Request-response" doc:name= "TCP"
Doc:description= "The TCP transport enables events to being sent and received over TCP sockets."/> Instructions /c0> main configu
The first post is a basic concept of JMS (a) –JMS, we introduce two kinds of JMS message models: The point-to-point and the publish-subscribe model, and the two ways messages are consumed: synchronous and asynchronous, the JMS programming model object, and finally the advantages of JMS.Second blog Brief introduction to
In the real enterprise, the application of message communication has been very hot, and plays a special role in the enterprise application of the Java EE, so it is very necessary to study it.In brief, the basic concept of JMS (a) –JMS, we introduce the canonical JMS of message communication, we introduce an open source JMS
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.