On 12 Apr 00, at 11:13, Richard Monson-Haefel wrote:
>
> This depends on how you want RemoteException thrown by other beans to be handled.
> Transactions in EJB 1.1 are always rollback in the event of a EJBException is thrown
> but not always for RemoteException. As David pointed out, you can choose to
>propagate
> the RemoteException thrown by another bean to the client.
>
Hi Richard,
Can you clarify this point for me? I understand that checked
exceptions normally do not automatically roll back the transaction
(to give the client an opportunity to recover), and also do not result
in the eviction of the instance from the container. But 12.3.7
seems to make RemoteException a special case:
"The EJB 1.1 specification requires that a Container support the
deprecated use of the java.rmi.RemoteException. The Container
should treat the java.rmi.RemoteException thrown by an enterprise
bean method in the same way as it is specified for the
javax.ejb.EJBException."
Because EJBException is an unchecked exception, and
RemoteException should be treated the same as EJBException, it
seems to me that RemoteException should be treated by the
container as if it were unchecked.
I believe that this is necessary for backwards compatibility. For
instance, if a bean in ejbCreate throws a RemoteException (rather
than EJBException, as is allowed) with the expectation that it does
not need to write recovery code, this contract will be broken if the
instance is not evicted from the container or if the transaction is not
marked for rollback.
Thanks,
Dan
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".