Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

rollback or throw exception  RSS feed

 
Greg Triant
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would like to ask the difference between an exception been thrown from an MDB (Transaction type: Container) and performing rollback.
Do both of these put the message back to the queue?
In both cases the retry limit is reduced by one?

Thanks
 
Mahendr Shinde
Ranch Hand
Posts: 38
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rollbacks are safer option to maintain integrity.
throwing an exception means "let someone else handle this...!"
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!