Understanding how the TransactionAttributeType affects transactions
The TransactionAttributeType attribute is used with the @TransactionAttribute annotation. It can be assigned one of six possible values which controls the creation and use of transactions. In this recipe, we will use the
SessionSynchronization interface to illustrate how the TransactionAttributeType element works.
The use of CMT is effected by:
- Using the @TransactionManagement annotation for the class
- Using the TransactionManagementType.CONTAINER element, as part of the above annotation, to specify that CMT is being used
- Using the @TransactionAttribute annotation at the class or method level to specify the scope of the transaction
The @TransactionAttribute annotation, ...