Inline....
>-----Original Message-----
>From: Basava Rajesh [mailto:Basava.Rajesh@(protected)]
>Sent: Tuesday, February 24, 2004 11:28 AM
>To: J2EEPATTERNS-INTEREST@(protected)
>Subject: Exception Handling in EJB Transactions.
>
>
>Hi,
> The EJB 2.0 specification states that if an
>EJBException is thrown,
>the container shall rollback the transaction while for
>Application level
>Exceptions, the container does not. But since EJBException is a
>RuntimeException(and thus is not checked), should the
>Application Exceptions
>thrown in the Data/Business layer extend EJBException??
They should be descendent of Exception classes
>Or do
>we catch the
>Application Exceptions and do a manual context.setRollbackOnly().
Yes , when ever in doubt of data integrity, do it.
>
> What would be the best way to handle rollback of
>Transactions when
>Application Exceptions are thrown?
do context.setrollback or retry. then throw that exception to client if
could not succeed.
>TIA,
>Rajesh.
>
>====================================================================
>Companion Site: http://www.corej2eepatterns.com
>J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
>List Archive:
>http://archives.java.sun.com/archives/j2eepatterns-interest.htm
l
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)
____________________________________________________
This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)