Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Application Exception - Checked / Un checked exception  RSS feed

 
Ramy Nady
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All ,

I know that container will roll back the transaction if the method throws application exception with rollback=true.

I need to know if the container behaves the same in case this application exception is checked or un checked exception?
For both cases will it roll back the transaction ?
 
Himai Minh
Ranch Hand
Posts: 1510
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. I think so.
When is used, the transaction will be rolled back no matter the application exception is checked or unchecked.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 2920
205
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agree with Himai.

The container will rollback the transaction for an application exception (@ApplicationException) if rollback=true (no matter if the exception is checked or not).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!