Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

BMT - CMT

 
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.
 
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.
 
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.
 
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic