Avi Kivity wrote:
> This can happen if the remote interface doesn't declare the application
> exception, as in
>
> public interface Interface extends EJBObject {
>     void method() throws RemoteException;
> }
>
> public class Bean implements SessionBean {
>     public void method() throws ApplicationException {
>         throw new ApplicationException();
>     }
> }
>
> The container catches the ApplicationException but cannot rethrow it, so it
> wraps it in a RemoteException.

Exactly right, and another reason to follow the "business interface"
pattern outlined in Richard Monson-Haefel's Enterprise JavaBeans book,
where you have an interface that both Interface and Bean (above) would
extend and implement respectively.  Then the compiler will catch this
error.

Cheers,
Laird

===========================================================================
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".

Reply via email to