| Author |
BMT - CMT
|
KasiMurugan Ramasamy
Ranch Hand
Joined: Jan 30, 2005
Posts: 125
|
|
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.
|
Thanks & Regards
Kasimurugan (SCJP1.4, SCBCD1.3), Preparing SCWCD1.4
|
 |
Miki Muzsi
Ranch Hand
Joined: Jun 23, 2003
Posts: 120
|
|
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
|
Miki<br /> <br />SCJP 1.4, SCBCD 1.3
|
 |
KasiMurugan Ramasamy
Ranch Hand
Joined: Jan 30, 2005
Posts: 125
|
|
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
Joined: Jun 23, 2003
Posts: 120
|
|
Kasimuruga, Sorry but I did not understand your point. Maybe you can explain it again. Miki
|
 |
KasiMurugan Ramasamy
Ranch Hand
Joined: Jan 30, 2005
Posts: 125
|
|
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
Joined: Sep 29, 2002
Posts: 1683
|
|
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.
|
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
|
 |
 |
|
|
subject: BMT - CMT
|
|
|