File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Can Transaction attributes be set to BMT?. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Can Transaction attributes be set to BMT?." Watch "Can Transaction attributes be set to BMT?." New topic
Author

Can Transaction attributes be set to BMT?.

Senthil Kumar
Ranch Hand

Joined: Mar 13, 2006
Posts: 264
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.


when you really want something, all the universe always conspires in your favour.<br /> <br />SCJP1.5-77%<br />SCWCD-89%
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Where did you see that X and Y were BMT ?


[My Blog]
All roads lead to JavaRanch
Senthil Kumar
Ranch Hand

Joined: Mar 13, 2006
Posts: 264
so you mean beans X and Y are configured to have CMT.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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

Joined: Mar 13, 2006
Posts: 264
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

"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

Joined: Sep 18, 2004
Posts: 380
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 ?.


/** Code speaks louder than words */
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can Transaction attributes be set to BMT?.