There's definitely a performance hit in catching any exception so I would
personally avoid doing so unless absolutely necessary.
>From: Dave Wolf <[EMAIL PROTECTED]>
>Reply-To: A mailing list for Enterprise JavaBeans development
><[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: When do you wrap with EJBException?
>Date: Sat, 24 Feb 2001 11:45:09 -0500
>
>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".
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
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".