I would rollback the tx immediately to insure consistancy using
_context.setRollbackOnly().  You can then decide to trow an application
level exception.

Dave Wolf
Internet Applications Division
Sybase


> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]
> Sent: Tuesday, September 26, 2000 10:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: System vs. Application Exception
>
>
> > -----Original Message-----
> > From: Dave Wolf [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, September 18, 2000 5:46 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: System vs. Application Exception
> >
>
> <snip>
> >
> > An application level exception is used to 1) notify your client of an
> > application specific error that should 2) stop execution of
> > the work being
> > performed.  For instance, attempting to remove an item from
> > the shelf, when
> > the shelf is empty.  There are non-systemic solutions to this
> > problem.  For
> > instance, you can prompt the user to look on another shelf.
> > There is no
> > need to doom the tx, or destroy the object when this occurs.
> >
> <snip>
>
> Hi Dave,
>
> what would you suggest, taking your shelf example, if there were some
> changes in other beans in the same tx before the remove on an empty shelf
> and those changes shall not be committed in such a case. Would you throw a
> system level exception (e.g. EJBException) or would you rollback with
> EJBContext.setRollBackOnly() and throw an application level exception?
>
> Mit freundlichen Gr��en
> With kind regards
>
> Ulf Gohde
> System Architect
> CE Computer Equipment AG     Fon: +49 (0)521 9318-167
> Herforder Str. 155a          Fax: +49 (0)521 9318-444
> 33609 Bielefeld              E-Mail:[EMAIL PROTECTED]
> Germany                      http://www.ce-ag.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".
>
>

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