O'Reilly logo

J2EE™ Applications and BEA™ WebLogic Server™ by Sandra L. Emerson, Rob Woollen, Michael Girdley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Transactions with Message-Driven Beans

Like other EJBs, message-driven beans make use of the EJB container's transaction service. Because message-driven beans never directly interact with clients, they never participate in the client's transaction.

Message-driven EJBs offer three different transaction options:

  • Required transaction attribute

  • NotSupported

  • Bean-managed transactions

Required Transaction Attribute

If the Required attribute is specified, the EJB container automatically starts a transaction. The message receipt from the JMS queue or topic is included in this transaction. The message-driven bean's onMessage method is then called in the transaction context. When the onMessage method returns, the EJB container commits the transaction. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required