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 TransactionAttribute 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 "TransactionAttribute " Watch "TransactionAttribute " New topic
Author

TransactionAttribute

sunnymet Metkar
Greenhorn

Joined: Jan 24, 2008
Posts: 12
Could anyone please explain the logic behind following restrictions.

For a message-driven bean�s message listener methods (or interface), only the REQUIRED and
NOT_SUPPORTED TransactionAttribute values may be used.

For an enterprise bean�s timeout callback method only the REQUIRES, REQUIRES_NEW and
NOT_SUPPORTED transaction attributes may be used.
why is it so?
eric khoa
Greenhorn

Joined: Sep 22, 2005
Posts: 10
I found something in Spec core

13.6.3 Container-Managed Transaction Demarcation for Message-Driven Beans

Only the NOT_SUPPORTED and REQUIRED transaction attributes may be used for message-driven
bean message listener methods. The use of the other transaction attributes is not meaningful for message-
driven bean message listener methods because there is no pre-existing client transaction context
(REQUIRES_NEW, SUPPORTS) and no client to handle exceptions (MANDATORY, NEVER).
eric khoa
Greenhorn

Joined: Sep 22, 2005
Posts: 10
For an enterprise bean�s timeout callback method only the REQUIRES, REQUIRES_NEW and
NOT_SUPPORTED transaction attributes may be used.


I think enterprise bean�s timeout callback method is also a business method. Therefore it can be call from client and can have REQUIRES_NEW attribute. The 2 other attributes I think explaining like MessageDrivenBean
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TransactionAttribute