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 big doubt HFE page 483 'Suspend a transaction' 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 "big doubt HFE page 483 Watch "big doubt HFE page 483 New topic
Author

big doubt HFE page 483 'Suspend a transaction'

Hai Lin
Ranch Hand

Joined: May 23, 2004
Posts: 79
Hi All,
On HFE Page 483, it says "If a transcation is in progress when a method on a BMT bean is called, the transcation is suspended."
I think the words "when a method on a BMT" is really a big doubt, even a method on a CMT bean is called, the transcation is still could be suspended, the suspending transaction depeneds on the method's transcation attribute.
Anyone could clear my doubt? Thanks a lot in advance.

Hai
Alex Sharkoff
Ranch Hand

Joined: Apr 11, 2004
Posts: 209
Hai,

You are correct in saying that the transaction can be also suspended when a method on CMT bean is called (eg, method trans-attribute is NotSupported).

The actual question asks explicitly about BMT beans:

If a transcation is in progress when a method on a BMT bean is called, the transcation is suspended."


and therefore the answer is always 'Yes' - no transaction can propogate into the BMT bean.

Hope it helps


Alex (SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCJD 1.4)
Hai Lin
Ranch Hand

Joined: May 23, 2004
Posts: 79
Alex,
Thanks a lot. Your answer relly clear my doubt.
Maybe we can do a summary for transaction suspend here, only three situations one transaction will be suspended:

suppose one transaction is in progress:
1) a method on a BMT bean is called.
2) a method on a CMT bean is called, and this method's transaction attribute is 'NotSupported'
3) a method on a CMT bean is called, and this method's transaction attribute is 'RequireNew'

I only can think of this three situations, do you have more situations for transaction which could be suspened?

Thanks.

Hai
Lionel Orellana
Ranch Hand

Joined: Mar 19, 2004
Posts: 87
Those are the only ones Hai. Look at pages 494 and 495 of HFEJB.
Cheers
[ July 08, 2004: Message edited by: Lionel Orellana ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: big doubt HFE page 483 'Suspend a transaction'