• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TransactionAttribute

 
sunnymet Metkar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic