Message-Driven EJB Advantages

Message-Driven EJBs provide a number of advantages over standard JMS consumers, and they should be the default choice when writing message consumers.

Using JTA Transactions with an Asynchronous Consumer

The WebLogic JMS implementation provides a powerful integration with the JTA transaction manager. This allows JMS message producers and consumers to participate in JTA transactions and enlist other resources such as EJBs or JDBC code in these transactions.

A standard JMS consumer enlists a JTA transaction by explicitly using a UserTransaction reference to begin and commit transactions. The message consumer can begin a UserTransaction and then call its receive method to consume a JMS message within that transaction. ...

Get J2EE™ Applications and BEA™ WebLogic Server™ 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.