Win a copy of Head First Agile this week in the Agile 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: 1566
10
  • 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: 2988
223
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).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!