|
Re: Handling System Exceptions in EJB
|
Posted: Aug 28, 2003 5:00 AM
|
|
This is something I copied from http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/BMP6.html. -----------------------------------------------------------"A system exception indicates a problem with the services that support an application. Examples of these problems include the following: a database connection cannot be obtained, a SQL insert fails because the database is full, or a lookup method cannot find the desired object. If your enterprise bean encounters a system-level problem, it should throw a javax.ejb.EJBException. The container will wrap the EJBException in a RemoteException, which it passes back to the client. Because the EJBException is a subclass of the RuntimeException, you do not have to specify it in the throws clause of the method declaration. If a system exception is thrown, the EJB container might destroy the bean instance. Therefore, a system exception cannot be handled by the bean's client program; it requires intervention by a system administrator." -----------------------------------------------------------
Fr om this what I understand is when you thorw a EJBException it raps it as RemoteException and throws back to client. So the client knows there is a problem.
|
|