Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Enterprise JavaBeans™ Specification, Version 2.0 - Sun Microsystems.pdf
Скачиваний:
14
Добавлен:
24.05.2014
Размер:
2.71 Mб
Скачать

Sun Microsystems Inc

System Administrator’s responsibilities

Enterprise JavaBeans 2.0, Public Draft

Exception handling

17.4.2.3 java.rmi.NoSuchObjectException

The java.rmi.NoSuchObjectException is a subclass of the java.rmi.RemoteException. It is thrown to the client if a remote business method cannot complete because the EJB object no longer exists.

17.5 System Administrator’s responsibilities

The System Administrator is responsible for monitoring the log of the non-application exceptions and errors logged by the Container, and for taking actions to correct the problems that caused these exceptions and errors.

17.6 Differences from EJB 1.0

The EJB 2.0 and EJB 1.1 specification of exception handling preserve 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 was 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 2.0 and 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 rollback a transaction and discard the instance if the instance threw the java.rmi.RemoteException.

In EJB 2.0 and 1.1, an application exception does not cause the Container to automatically rollback a transaction. In EJB 1.0, the Container was required to rollback a transaction when an application exception was passed through a transaction boundary started by the Container. In EJB 1.1, the Container performs the rollback only if the instance have invoked the setRollbackOnly() method on its EJBContext object.

353

5/31/00

Sun Microsystems Inc.

Exception handling

Enterprise JavaBeans 2.0, Public Draft

Differences from EJB 1.0

5/31/00

354