• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BMT & CMT in ejbCreate

 
Srinivasan Rengan
Ranch Hand
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a significant point to get clarified. In case of stateful session bean, we will not be able to call methods on the (BMT) user transaction object, inside setSessionContext. Why is this? But, we will be able to do the same thing in the business method. What determines the access to the transaction method access? Also, how is this different incase of CMT based methods(setRollbackOnly & getRollbackOnly).

Thanks:
 
Ankit Doshi
Ranch Hand
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case of stateful session bean, we will not be able to call methods on the (BMT) user transaction object, inside setSessionContext. Why is this?


That's because setSessionContext runs under unspecified transaction context. Look at this page on Frederic's site. This table summarizes the various methods of various beans and their transaction context association. The spec page numbers, from where these details are taken, are also mentioned on the table.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic