wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Does EJB Container rollbacks the Transaction in case of a RuntimeException?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Does EJB Container rollbacks the Transaction in case of a RuntimeException??" Watch "Does EJB Container rollbacks the Transaction in case of a RuntimeException??" New topic
Author

Does EJB Container rollbacks the Transaction in case of a RuntimeException??

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

I am having a query in understanding rollback of the Transactions in case of a RuntimeException .

Please let me know this

While executing a Method in case of a Runtime Exception , will the container will automatically rollback the Transaction ??


Thanks in advance .

Save India From Corruption - Anna Hazare.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

It depends on the transaction attributes of the method.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

I have set it to NOT SUPPOURTED , will the rollback of the Transaction will happen in case of a RuntimeException ??

Thanks in advance .
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Ravi Kiran V wrote:I have set it to NOT SUPPOURTED , will the rollback of the Transaction will happen in case of a RuntimeException ??

Thanks in advance .


When you set it to NOT_SUPPORTED, then there is no transaction at all. So RuntimeException won't do anything!


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
 
 
subject: Does EJB Container rollbacks the Transaction in case of a RuntimeException??
 
Similar Threads
page 561 exercise question
Propagation of EJBException
Exception
Txn not automatically rolling back after RemoteException
Commit Rollback not working