In-depth introduction to JMS (II)-Composition of JMS, in-depth introduction to composition of jmsJMS Provider
The message system that implements the JMS specification also provides all-round functions required for management and control, as shown in ActiveMQ.Administered Objects
Administered Objects is a pre-configured JMS
ConnectionFactory object. The client uses a connection factory object to connect to the JMS service provider, which creates a connection between the JMS service provider and the client. The JMS client (such as the sender or receiver) searches for and obtains the connection in the JNDI namespace. With this connection, the client can communicate with the destinati
messages. It enables distributed communication that is loosely coupled, reliable, andAsynchronous.
JMS is a message standard that allows Java ee-based application components to create, send, receive, and read messages. With JMS, You can implement loose coupling, dependency, and asynchronous distributed communication. In this section, we should pay attention to two points: first, this is a standard, similar
connection:Session session = connection. createsession (false, session. auto_acknowledge)The parameter description is not required for the time being. It will be detailed later.D) You can create a message. Here, a textmessage is created.Message message = session. createtextmessage ("Hello JMS! ");E) To send the created message, you need to create a message producer by session and destination:Messageproducer producer = session. createproducer (Queue )
response result from the message queue and continues to process the historical credit result information.
JMS
If you have used JMS, you will find it is similar to writing JDBC or JCA code. It has sample code for creating or retrieving JMS resources. The sample
software systems for the porting and duplication of work, thereby greatly reducing the technical burden.
Take in Action
After understanding what JMS is, in practice, Dreamforce will introduce you to consolidating JMS in spring while combining Apache ACTIVEMQ to implement an analog chat function.
Incoming scene: A on the input side of the message, the message will be sent asynchronously to the activemq,b si
Introduction to MQ:
MQ is all called the message queue, and Message Queuing (MQ) is an application-to-application communication method. Applications communicate by writing and retrieving data (messages) for applications that enter and leave the queue, without requiring a private connection to link them. Message passing refers to the process of communicating between programs by sending data in a message, rather than by directly invoking each other, and directly invoking techniques such as remote
the Java platform: simple JMS clients, combined with session beans for JMS, and message-driven beans. We will revisit each type, their respective strengths and weaknesses, and their applicability to different enterprise scenarios.
Simple JMS Client
Although JMS is an enterprise-class technology released with Java 2 E
.
=========using the Java messaging service in Bea WebLogic In the last two years, Sun has introduced many APIs for enterprise application development. The most exciting of these is the Java Messaging Service or JMS. The JMS API is designed for messaging in the enterprise, where the task of Jndi is to name and provide directory services for directory services, and JNBC's task is to provide database acce
Reprint Address: http://blog.csdn.net/aking21alinjuju/article/details/6051421 Aking21alinjujuDirectory:
Enterprise Messaging System
Benefits of the Enterprise messaging system
Provides message flexibility
Loosely coupled
What is JMS
The target of JMS
JMS Two message models
Dot-to-point model
I wrote some content about JMS in my previous blog. Later I thought that the content of that blog was not enough to elaborate on JMS, so this blog will continue to improve JMS.Configure the JMS feature of jmsweblogic server in the WebLogic Server Environment
Weblogic server implements the JMS service provider (Servic
system administrator on the Application Server console and stored in the JNDI namespace or the JNDI registry of the Application Server.ConnectionFactory)
The client uses a connection factory object to connect to the JMS service provider, which creates a connection between the JMS service provider and the client. The JMS client (such as the sender or receiver) se
objects must manage the status of the created JMS connection. The connection is composedThe connection factory is created and located through the JNDI lookup. // Obtain queueconnectionfactory for P2PQueueconnectionfactory = queueconnectionfactory (); Context messaging =New initialcontext (); queueconnectionfactory = (queueconnectionfactory)Messaging. Lookup ("queueconnectionfactory"); // obtainTopicconnectionfactory topicconnectonfactory topicconnect
What if the phone can only make real-time calls, without messages and text messages? A phone call came, just didn't have time to pick up, then the phone to send the message must not be received. Why not save the information first and then get the information when the user needs to see it? Along with this doubts, short-term interest and message came into being, whether the phone is turned on or not, we can get the information in the time. JMS provides
Label: style http OS ar use Java strong SP data
What if the phone can only perform real-time calls without messages or text messages? When a phone call arrives, the phone call cannot receive any information. Why can't I save the information first? When the user needs to view the information, I can get the information again? Along with this doubt, short messages and messages came into being. no matter whether the phone is turned on or not received in time, we can get the information in it.
is not to be affected by provider-specific, so that the code can be easily ported between different JMS provider. This example does not focus on developing products, but explains how to work with JBOSSMQ.1 Initialization contextOne way to configure Jndi with a W is through the property file Jndi.properties. Use the correct value in this file and include the path it contains in the classpath, which compares
What if the phone can only perform real-time calls without messages or text messages? When a phone call arrives, the phone call cannot receive any information. Why can't I save the information first? When the user needs to view the information, I can get the information again? Along with this doubt, short messages and messages came into being. no matter whether the phone is turned on or not received in time, we can get the information in it. JMS provi
What if the phone can only perform real-time calls without messages or text messages? When a phone call arrives, the phone call cannot receive any information. Why can't I save the information first? When the user needs to view the information, I can get the information again? Along with this doubt, short messages and messages came into being. no matter whether the phone is turned on or not received in time, we can get the information in it. JMS provi
Summary: The Java Message Service (JMS) API is a messaging standard, allows application components based on the Java platfor M Enterprise Edition (Java EE) to create, send, receive, and read messages. IT enables distributed communication is loosely coupled, reliable, and asynchronous.
The JMS (JAVA message Service,java message Service) API is a standard or specification for a messaging service that allo
one-to-many message publishing receive policy that listens to multiple sub-topic addresses to receive messages from Publisher. Sub receives notification MQ server
One message to the receiving policy, a sender sends a message, only one receiver receives. After receiver is received, the MQ server is notified that the MQ server has deleted or otherwise acted on the messages in the queue.
The following is the code that conforms to the Jms1.
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.