Using Bean-Managed Transactions
The first point to make about bean-managed transaction demarcation is that you should avoid using it. When you choose this method of transaction management for a session or message-driven bean (you’re not allowed to use it for entity beans), you’re responsible for starting each transaction that applies to the bean’s methods and then committing it or rolling it back to end it. You’re offered this option to handle situations where you need to control transaction boundaries in a way that you can’t achieve using container-managed demarcation. You should consider this approach to be only for advanced programmers with detailed knowledge of the application and managing distributed transactions.
To use bean-managed transaction ...
Get Special Edition Using Enterprise JavaBeans™ 2.0 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.