"Sriram Narayan (CTS)" wrote:
> ...Reposting in the hope of getting some answers.

This has probably not been answered because it's spelled out in the
EJB1.1 specification.

> pls do respond even if u feel this is a naive question.

Just this once.

> If the method fails because of a Unique Constraint violation, i throw an
> application exception - MyAppX, to the calling servlet.
> In this case, where only one db operation is involved, will it make a
> difference if i embed MyAppX inside an EJBException before throwing it to
> the servlet?

Well, I'm a little confused on what you're asking.  Basically, if a
RuntimeException of any kind (like EJBException) gets thrown outside of
the transaction boundary, the transaction will roll back.  Period.  The
client will get a RemoteException that wraps the thrown
RuntimeException.

If you throw an application exception (for the purposes of this
discussion a non-RuntimeException of any kind), the transaction does not
automatically roll back.

Please read the three pages of the specification that speak to this more
clearly than I have in case I have not answered your question.  You will
avoid flames if you do so.

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