Application Exceptions

As far as the EJB container is concerned, exceptions can be separated into two types: those that represent a violation of a business rule (or some other condition in the application logic) and those that represent a low-level system problem. These types are known as application exceptions and system exceptions, respectively. It’s important for you to learn the distinction because the EJB container treats them quite differently. This is especially true when it comes to transactions.

An application exception is thrown to indicate that some type of problem has been detected by an application’s business logic. As an example, you might throw an application exception if an attempt to submit an auction bid that is less than the ...

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.