Outside of the fact that RemoteException may become deprecated in a future
release, I dont know why you would do this.  A system exception is a system
exception.  In remote interface still throws RemoteExcception as per the
spec anyway.

Dave Wolf
Internet Applications Division
Sybase

----- Original Message -----
From: "Robert Nicholson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 24, 2001 11:31 AM
Subject: When do you wrap with EJBException?


> Specifically when would you wrap a RemoteException with EJBException?
>
> Do you do this when messenging another bean and forcing the transactoin to
> roll back to generating a system exception?
>
> Isn't Remote Exception already treated as a system exception? Why would
you
> catch it and wrap it and throw to the caller from within inside the caller
> bean? Isn't it just because it's a RunTimeException subclass and you don't
> have to put RemoteException in the throws clause?
>
>
> ....
>
> What is the difference b/w the following?
>
> 1. Catching RemoteException and wrapping it in an EJBException
> and not declaring RemoteException in the throws clause.
>
> 2. Declaring RemoteException in the throws clause not catching
> RemoteException when messaging a bean inside a bean and letting it pass up
> to the caller.
>
> ...
>
> Either way the contain will rollback the transaction right? So is this
just
> a means to simply the API by not having to mention RemoteException?
>
> I know that the general rule is to wrap any checked exception that you
> cannot recover from with an EJBException but why given the container does
> the same thing.
>
>
===========================================================================
> 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".
>
>

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