An overview of WebSphere asynchronous messaging using JMS
WebSphere Application Server supports asynchronous messaging as a method of communication based on the Java Message Service (JMS) programming interface. JMS provides a common way for Java programs (clients and J2EE applications) to create, send, receive, and read asynchronous requests, as JMS messages.
This topic provides an overview of asynchronous messaging using JMS support provided by WebSphere Application Server. For more details about JMS, see
Sun's Java Message Service (JMS) specification documentation .
The base support for asynchronous messaging using JMS, shown in the following figure, provides the common set of JMS interfaces and associated semantics that define how a JMS client can access the facilities of a JMS provider. This enables WebSphere J2EE applications, as JMS clients, to exchange messages asynchronously with other JMS clients by using JMS destinations (queues or topics). A J2EE application can use JMS queue destinations for point-to-point messaging and JMS topic destinations for publish/subscribe messaging. A J2EE application can explicitly poll for messages on a destination then retrieve messages for processing by business logic beans (enterprise beans).
![]()
Asynchronous messaging using JMS. This figure shows an enteprise application polling a JMS destination to retrieve an incoming message, which it processes with a business logic bean. The business logic bean uses standard JMS calls to process the message; for example, to extract data or to send the message on to another JMS destination. For more information, see the text that accompanies this figure.With the base JMS/XA support, the J2EE application uses standard JMS calls to process messages, including any responses or outbound messaging. Responses can be handled by an enterprise bean acting as a sender bean, or handled in the enterprise bean that receives the incoming messages. Optionally, this process can use two-phase commit within the scope of a transaction. This level of functionality for asynchronous messaging is called bean-managed messaging, and gives an enterprise bean complete control over the messaging infrastructure; for example, for connection and session pool management. The appserver has no role in bean-managed messaging.
WebSphere Application Server also supports automatic asynchronous messaging using message-driven beans (a type of enterprise bean defined in the EJB 2.0 specification) and JMS listeners (part of the JMS appserver facilities). Messages are automatically retrieved from JMS destinations, optionally within a transaction, then sent to the message-driven bean in a J2EE application, without the application having to explicitly poll JMS destinations. For more information about asynchronous messaging with message-driven beans, see An overview of asynchronous messaging with message-driven beans
With WBI Server Foundation, J2EE applications can use another level of functionality for asynchronous messaging, called extended messaging. The appserver manages the messaging infrastructure, and extra standard types of messaging beans are provided to add functionality to that provided by message-driven beans. This level of functionality enables application developers to concentrate on the business logic to be implemented by the enterprise beans and to leave the messaging usage to standard messaging objects and configuration of the extended messaging service.
WebSphere JMS support - components
Message-driven beans - an overview
WebSphere MQ JMS connection pooling
Using JMS and messaging in applications