Oleg Nitz wrote:
> DO> On the other hand, system exceptions should always be logged.
> DO> They indicate abnormal operation, and anyway the specification
> DO> requires that they be logged.
> Correct, 17.2.2 runs:
> "The Container catches a non-application exception, logs it (which can
> result in alerting the System Administrator), and, unless the bean is
> a message-driven bean, throws the java.rmi.RemoteException
> (or subclass thereof) to the client."

You are citing from the EJB2.0pre specification's section about the
bean providers responsibilities.
The container providers responsibilities are a bit more complex and
stated in section 1.2.3 of the EJB1.1 specification.
Here it is worth noting that when a bean has thrown a non-application
exception, _no_ methods should be invoked on that instance.

> If I understand correctly,
> "non-application exception" <=> instanceof RuntimeException

EJB1.1 section 1.2.1 defines it as: "An application exception is an
exception defined in the throws clause of a method of the enterprise
Bean's home and remote interfaces, other than the java.rmi.RemoteException.

IMHO this is a little unclear. All EJB containers that I know of define:
"application exception" <=> instanceof Exception AND 
                            !instanceof RuntimeException AND
                            !instanceof RemoteException

Best Regards,

Ole Husgaard.


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to