Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
JSP - A mailing list about Java Server Pages specification and reference
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Exception Handling in EJB Transactions.

Exception Handling in EJB Transactions.

2004-02-24       - By Kalra, Ashwani

 Back
Reply:     1     2     3     4     5     6  

see below..

>-- --Original Message-- --
>From: Basava Rajesh [mailto:Basava.Rajesh@(protected)]
>Sent: Tuesday, February 24, 2004 12:03 PM
>To: J2EEPATTERNS-INTEREST@(protected)
>Subject: Re: Exception Handling in EJB Transactions.
>
>
>hi,
>
>thanks for the quick response.
>Dont u think its a overhead in every method to catch the Application
>Exception and do a setRollBackOnly() ?

Overhead is not there for catching, but for throwing exception. so dont
worrry about that.

>This could be avoided by creating Application Exception extending the
>EJBException and hence the container takes care of rolling back the
>transactions.
in this case you dont have the choice of retrying the transaction. Since its
application exception, you can retry the Tx.
But if you extend EJBException, it will become SystemException, and it will
always be rolled back by container.

>
>thanks n regards,
>Rajesh
>
>-- --Original Message-- --
>From: Kalra, Ashwani [mailto:ashwani.kalra@(protected)]
>Sent: Tuesday, February 24, 2004 11:45 AM
>To: J2EEPATTERNS-INTEREST@(protected)
>Subject: Re: Exception Handling in EJB Transactions.
>
>
>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)
>
>====================================================================
>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)



©2008 junlu.com - Jax Systems, LLC, U.S.A.