The EJB3 attribute is equivalent to javax.ejb.TransactionAttribute .
Like the Spring @Transactional annotation, you can control the propagation of the transaction by passing the TransactionAttributeType to the TransactionAttributeType annotation, for example:
@TransactionAttribute(NOT_SUPPORTED) @Stateful public class TransactionBean implements Transaction { ... @TransactionAttribute(REQUIRES_NEW) public void firstMethod() {...} @TransactionAttribute(REQUIRED) public void secondMethod() {...} public void thirdMethod() {...} public void fourthMethod() {...} }
Container-driven operations are described in Part IV of the Java EE 5 Tutorial .
source share