Using the JMS API in a J2EE Application

This section describes the ways in which using the JMS API in a J2EE application differs from using it in a stand-alone client application:

  • Using session and entity beans to produce and to synchronously receive messages

  • Using message-driven beans to receive messages asynchronously

  • Managing distributed transactions

  • Using application clients and Web components

A general rule new in the J2EE 1.4 platform specification applies to all J2EE components that use the JMS API within EJB or Web containers:

Any component within an EJB or Web container must have no more than one JMS session per JMS connection.

This rule does not apply to application clients.

Using Session and Entity Beans to Produce and to Synchronously ...

Get The J2EE™ Tutorial Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.