• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the transaction attributes of the method.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10111
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic