Handling transactions manually
Handling a transaction manually provides the developer with more control over the transaction, but requires more work. This type of transaction control is called a BMT.
It is possible to begin and start a transaction anywhere within a method. The boundaries of a transaction are explicitly set using the
commit transaction methods. For CMT the boundaries of a transaction are effectively the method. BMTs are only possible for session- and message-driven beans. They cannot be used for entities.
The steps used to handle transactions manually include:
- Using the @TransactionManagement annotation to specify bean-managed transactions
- Injecting an instance of the
- Enclosing the transaction ...