EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g
上QQ阅读APP看书,第一时间看更新

Simplified checked exceptions

Checked exceptions are exceptions that are not a subclass of the java.lang.RuntimeException. In EJB 2.1, if a bean method performs an operation that results in a checked exception that the bean method cannot recover, the bean method should throw the javax.ejb.EJBException that wraps the original exception. In EJB 3.0, application exceptions that are checked exceptions may be defined as such by being declared in the throws clause of the methods of the bean's business interface, home interface, component interface, and web service endpoint. AroundInvoke methods are allowed to throw checked exceptions that the business methods allow in the throws clause.