This is kind of hard to...
1) ...understand by reading the spec
2) ...to motivate

...but it conforms to EJB 1.1.

Runtime exception originating from application code -> Container rollback
None-runtime exceptions originating from application code -> Container
commits.

So far, I haven't found one single situation, when I would like an exception
to commit a transaction. Does someone have an idea about the rational of
this behaviour (the transactional semantics for application exceptions)?

Just to avoid misunderstanding:

A RemoteException is not a runtime exception, but it has special treatment
by the container. If you derive an exception from RemoteException, I suppose
your container classifies it as any application exception. The EJB 1.1. spec
recommends you to throw EJBException, instead of remote exception.

/Johan

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of krithikav
Sent: den 26 april 2001 16:56
To: [EMAIL PROTECTED]
Subject: Rollback in CMT
Importance: High

Hi,
When I throw a remoteexception from my EJB which has Container Managed
Transaction, the
container rollsback the database updates. However if I derive an Exception
class from the
RemoteException and throw the same from my EJB, the container does not
rollback the transaction. Why is this so? Or am I making some mistake?

Regards,
Krithika

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