EJB.12.6 Differences from EJB 1.0


The EJB 1.1 specification of exception handling preserved the rules defined in the EJB 1.0 specification, with the following exceptions:

  • EJB 1.0 specified that the enterprise bean business methods and container-invoked callbacks use the java.rmi.RemoteException to report non-application exceptions. This practice is deprecated in EJB 1.1 ”the enterprise bean methods should use the javax.ejb.EJBException or other suitable RuntimeException to report non-application exceptions.

  • In EJB 1.1, all non-application exceptions thrown by the instance result in the rollback of the transaction in which the instance executed and in discarding the instance. In EJB 1.0, the container would not roll back a transaction and discard the instance if the instance threw the java.rmi.RemoteException .

  • In EJB 1.1, an application exception does not cause the container to automatically roll back a transaction. In EJB 1.0, the container was required to roll back a transaction when an application exception was passed through a transaction boundary started by the container. In EJB 1.1, the container performs the roll back only if the instance has invoked the setRollbackOnly() method on its EJBContext object.



Java 2 Platform, Enterprise Edition. Platform and Component Specifications
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
ISBN: 0201704560
EAN: 2147483647
Year: 2000
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net