The Java EE 6 Tutorial

Summary of Transaction Attributes

Table 28–1 summarizes the effects of the transaction attributes. Both the T1 and the T2 transactions are controlled by the container. A T1 transaction is associated with the client that calls a method in the enterprise bean. In most cases, the client is another enterprise bean. A T2 transaction is started by the container just before the method executes.

In the last column of Table 28–1, the word “None” means that the business method does not execute within a transaction controlled by the container. However, the database calls in such a business method might be controlled by the transaction manager of the database management system.

Table 28–1 Transaction Attributes and Scope

Transaction Attribute 

Client’s Transaction 

Business Method’s Transaction 

Required

None 

T1 

T2 

T1 

RequiresNew

None 

T1 

T2 

T2 

Mandatory

None 

T1 

Error 

T1 

NotSupported

None 

T1 

None 

None 

Supports

None 

T1 

None 

T1 

Never

None 

T1 

None 

Error