Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction End limit in case of CMT

 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case of CMT, we use the transaction attributes to specify the transaction boundaries. But I am not sure exactly when the transaction would end.

Like, in case of RequiresNew attribute, a new transaction would be started (if one already existed, it would be suspended), but when would this newly started transaction end - in either commit or rollback? By the end of this method with RequiresNew attribute? If not, when?
 
Prashant Tejura
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
New Transaction boundry started by RequiresNew attribute on a method ends when that method finish its execution
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case, let say the client calls a methodA on a bean and methodA internally calls 10 different methods from inside - the original transaction started by the methodA will not be completed till all the internal method calls are not completed, is that Correct?
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct, the method's transaction begins just before the method starts and ends just before the method completes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic