Asynchronous messaging using JMS

 

WAS supports asynchronous messaging based on the JMS.

WebSphere J2EE apps exchange messages asynchronously with each other using JMS destination queues (point-to-point) and destination topics (publish-subscribe). J2EE apps poll for messages on a destination, which are then processed by EJBs.

XA support allows responses to be handled by an EJB bean acting as a sender bean, or handled in the EJB 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 EJB complete control over the messaging infrastructure; for example, for connection and session pool management. The appserver has no role in bean-managed messaging.

WAS also supports automatic asynchronous messaging using message-driven beans and JMS listeners. 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.

With WAS Enterprise, 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 EJBs 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
MQ JMS connection pooling
Using JMS and messaging in applications

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.