Skip Headers
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g (

Part Number E13981-01
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF

Configuring EJB 2.1 Transaction Management

You can configure who is responsible for managing transactions that involve a given EJB 2.1 enterprise bean (see "Using Deployment XML").


EJB 2.1 entity beans must always use container-managed transaction demarcation. An EJB 2.1 entity bean must not be designated with bean-managed transaction demarcation.

For more information, see the following:

Using Deployment XML

To configure transaction management, use the ejb-jar.xml file <transaction-type> subelement, as Example 21-3 shows.

Valid values are Container or Bean. The default is Container.

Example 21-3 Configuring Transaction Management for an EJB 2.1 Session Bean

        <display-name>A Credit-Service Bean</display-name>

You can configure <transaction-type> for all of session, entity, and message-driven beans. However, for an EJB 2.1 entity bean, you can only configure <transaction-type> as Container.