• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Quick question on transactions

 
Grand Puba
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the container always roll-back the transaction (or at least mark the transaction for roll-back)? Even whith BMT beans?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the container always roll-back the transaction (or at least mark the transaction for roll-back)? Even whith BMT beans?

What do you mean by "always"? Transactions will only rollback when there are unexpected events happened. For BMT, the container will not help you to rollback the transactions, you need to explicit declare that the transaction is rollback by ut.rollback(), where ut is an object of UserTransaction.

Nick
 
Grand Puba
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Nick,
I wasn't very clear in my question (I think that's the stress because I have the exam today). I actually ment: Does the container always roll-back the transaction (or at least mark the transaction for roll-back) when a System exception is thrown ?

Sorry for my previous question...
Thx 4 the reply thou
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic