O'Reilly logo

Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications by Paul Anderson, Gail Anderson

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

Using Exceptions with EJBs

The J2EE architecture provides for the detection and handling of exceptions. There are two kinds of exceptions: system exceptions and application exceptions. Application exceptions indicate recoverable-type problems (for example, bad user input or a requested purchase item being unavailable). The EJB container propagates application exceptions to the remote client, who presumably will have a catch handler in place to correct the problem (if possible) or take evasive action. The NoTrackListException shown in Listing 4.3 on page 95 is an example of an application exception. Application exceptions should be subclasses of Exception.

System exceptions indicate nonrecoverable errors, such as a lost database connection or ...

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