O'Reilly logo

Applied Enterprise JavaBeans™ Technology by Kevin Boone

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

15.2. Exception handling: philosophy and practice

Exception handling is always important in Java development, and particularly so with EJBs. The EJB Specification devotes a whole chapter [EJB2.0 18] to this topic. This section describes some of the general issues concerning exception handling in EJBs, the more specific issue of the interaction between exception handling and transaction management is covered in Chapter 9.

15.2.1. Review of Java exceptions

In Java, exceptional circumstances are indicated by generating an object of a class that inherits from java.lang.Throwable, and using the throw keyword to pass it out of the method to the caller. The caller can use catch to trap the thrown object, or allow it to be thrown out to its own caller. ...

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