• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can Transaction attributes be set to BMT?.

 
Senthil Kumar
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to specify the transaction attributes for BMT.

Page no 321 in ejb-core-specs there is picture demonstrating the BMT.In that picture what does the mean by the client.is it a servlet or a bean.

The application programmer demarcates the transaction with begin and commit calls. If the enterprise beans X and Y are configured to use a client transaction (i.e., their methods have transaction attributes that either require or support an existing transaction context), the EJB server ensures that the updates to databases A and B are made as part of the client�s transaction.


How the beans with the BMT types be configured with the transaction attributes.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where did you see that X and Y were BMT ?
 
Senthil Kumar
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so you mean beans X and Y are configured to have CMT.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. The text says if they are configured to use a client transaction. Maybe you confused the client's transaction, and beans X and Y transactions. X and Y transactions can be anything.
 
Senthil Kumar
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so what they mean here is

" Transaction is started by invoking the begin() of BMT and then they call the methods of bean X and Y which are configured to have CMT, all will be considered as a single transaction."

is this correct. if not correct me
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Transaction is started by invoking the begin() of BMT and then they call the methods of bean X and Y which if configured to have CMT (Support or Requires attribute) will use the caller's transaction."
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm.... A little doubt here...

If a BMT bean calls a bean that is CMT (or the other way round) (Supports/Required/RequiresNew/Mandatory) how does transaction management between BMT and CMT internally work? .

i.e what if exception was to be thrown from one transaction type Bean. What the exception be propagated wrt rules of Caller alone ?.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic