Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on Transactions  RSS feed

 
Pavan Sambare
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's say I have an MDB which has BMP and in the onMessage of the MDB, I am calling a method in an Entity Bean with CMP.
Now my question is, since the method of the Entity Bean has been called in context of the user transaction of the MDB, will a new transaction be created by the container for the Entity bean or will it continue with the same User transaction of the MDB?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36393
453
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pavan,
It depends on the settings in your deployment descriptor. For example, if the EJB is set to use RequiresNew, a new transaction will be created. If it uses Required or Supports, the existing transaction will be used.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!