O'Reilly logo

Special Edition Using Enterprise JavaBeans™ 2.0 by Brian Keeton, Chuck Cavaness

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exceptions and Transactions

The most important reason to talk about exception handling in EJB is to understand how exceptions impact transactions. You’ve already seen some of the reasons why it’s important to separate application and system exceptions, but their effect on transactions is at the top of the list. An enterprise system must handle exceptions in such a way that transactional integrity is maintained. This requirement places responsibility on both the EJB container and on you as a bean provider.

Throwing an Application Exception During a Transaction

If an application exception is thrown from a bean method during a transaction, the container doesn’t automatically roll back the transaction or mark it for rollback. The intent is to give ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required