Bean-managed transactions
As we have seen, container-managed transactions make it ridiculously easy to write code that is wrapped in a transaction. There is nothing special that we need to do to make them that way; as a matter of fact, some developers are sometimes not even aware that they are writing code that will be transactional in nature when they develop session beans. Container-managed transactions cover most typical use cases that we will encounter. However they do have a limitation; each method can be wrapped in a single transaction or without a transaction. With container-managed transactions, it is not possible to implement a method that generates more than one transaction, but this can be accomplished by using bean-managed transactions: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access