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

BMT - CMT

 
KasiMurugan Ramasamy
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For BMT,
If any transaction associated with client which is calling a method with transaction attribute specified as BMT, is suspended.

what is the reason?

Regards
Kasimurugan R.
 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Transactions are not allowed to propagate IN BMP.

I think the reason is because in BMP the bean provider controls the "lifecycle" of a transaction. If a client starts a TX, then calls in a BMP where the TX is commited (the user is in control!), the code returns to the client with a closed transaction which I think is undesireable.

Miki
 
KasiMurugan Ramasamy
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Miki

You mean, when the method is specified as BMT, the method could not find( no method available to the bean provider finding any transaction is opened) any trancation is opened from the caller.

Am i right?

Regards
Kasimuruga R.
 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kasimuruga,

Sorry but I did not understand your point. Maybe you can explain it again.

Miki
 
KasiMurugan Ramasamy
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Miki


Transactions are not allowed to propagate IN BMP.

I think the reason is because in BMP the bean provider controls the "lifecycle" of a transaction. If a client starts a TX, then calls in a BMP where the TX is commited (the user is in control!), the code returns to the client with a closed transaction which I think is undesireable.


Yes, your point is absoutely correct, One more point i want to add your point is,

The purpose of BMT is, if we need transaction on only piece code of a method.If we want transaction on piece code of method only needed means, we don't need the whole method run in a transaction that case if BMT get the previous transaction, the purpose of BMT would fail.

Am i right miki.

Thanks & Regards
Kasimurugan R.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For A BMT bean to begin a transaction whilst in the context of a client transaction would be in breech of the EJB spec which does not permit nested transactions. For this reason, all transactions coming into a BMT bean are suspended.

Once the BMT bean's transaction is completed, the client's transaction resumes. By doing it this way, the client's transaction is unaffected by the commit or rollback of the BMT bean's transaction.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic