• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TransactionAttribute

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic