• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about stateful session beans and transactions  RSS feed

 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have read about the dangers of beginning a transaction in a stateful session bean and not ending that transaction - which could result in the bean never being passivated. My question is then how do I ensure the transaction ends bearing in mind I only use container transactions?
Thanks in advance,
Julien Martin.
 
Brian Tinnel
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't have to worry about it with a container managed transaction. They will be handled correctly automatically. It is only when you have bean managed transactions that you ned to make sure that any trnsactions you start (by calling UserTransaction.begin) have a corresponding rollback or commit.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!