O'Reilly logo

Sams Teach Yourself EJB in 21 Days by Krishna Kothapalli, Ragae Ghaly

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

Example for Developing EJB with CMT

For EJB applications with container-managed transactions, a basic transaction works in the following way:

  1. In the EJB's standard deployment descriptor, the EJB developer or assembler specifies the transaction type by setting the <transaction-type> tag with the value Container (for CMT).

  2. In the standard deployment descriptor, the EJB developer or assembler specifies the transaction attribute by setting the value of the <trans-attribute> tag to one of the following values: NotSupported, Required, Supports, RequiresNew, Mandatory, or Never. This tag enables you to set a default value for all methods of the entire EJB, or a value for each specific method of the EJB. Refer to the “Setting Transaction Attributes” section ...

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