aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes BMT problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "BMT problem" Watch "BMT problem" New topic
Author

BMT problem

Jayashree Mohan
Ranch Hand

Joined: Nov 23, 2005
Posts: 37
Which two are true about bean-managed transaction demarcation?

A) A transaction used by a BMT bean MUST have been started by the bean.
B) The caller's transaction will be propogated into a BMT bean.
C) Transactions in a BMT bean do not propogate when the BMT bean calls
a method on another bean.
D) A bean cannot use both CMT and BMT together.
E) BMT beans must not specify transaction attributes

a,c,d and e seem to be true to me?Which are the 2 correct answers?
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2854
    
  11

I agree with you. Where does this question come from?
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Why do you think that a,c,d and e are true?


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2854
    
  11

I don't know why Jayashree thinks they're true, but for me:

A. Transactions don't propagate into BMT beans, so if it's using a transaction, then it must have started it.

C. Oops, not true. Transactions can propagate from BMT beans, just not to them.

D. Beans must be marked either BMT or CMT.

E. Not sure about this one actually. The transaction attributes (REQUIRED, MANDATORY, SUPPORTED, etc.) only really make sense for CMT. I suppose you could mark them for BMT though. I never really thought about it.

So if I had to choose only two, I'd go for A and D.
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
E. Not sure about this one actually. The transaction attributes (REQUIRED, MANDATORY, SUPPORTED, etc.) only really make sense for CMT. I suppose you could mark them for BMT though. I never really thought about it.

According to the EJB spec:

There is no mechanism for an Application Assembler to affect enterprise beans with bean-managed transaction demarcation. The Application Assembler must not define transaction attributes for an enterprise bean with bean-managed transaction demarcation.
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2854
    
  11

All right, so we're down to A and D. Which one should we throw out, or is the question wrong?
Sub swamy
Ranch Hand

Joined: Oct 02, 2002
Posts: 121
Arent A, D ,E true in the above ?
a) true - since BMT beans do not participate in the propogated transaction
d) true
e) true - as per spec.
B.Sathish
Ranch Hand

Joined: Aug 18, 2005
Posts: 372
yes. A, D and E are right
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BMT problem