• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

TRANSACTION CONTEXT

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In spec,

An enterprise bean instance can access resource managers in a transaction ONLY in the enterprise bean's methods in which there is a TRANSACTION CONTEXT available.


That means the transaction attribute of the method should be Required, RequiresNew, Mandatory in order to access resource managers? How about the supports?
 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For a CMT bean, if the transaction attribute is NotSupported or Never, the method executes with an unspecified transaction context. In the case of the Supports attribute, this happens only when the client calls without a transaction context.
To know more about enterprise bean methods in which a transaction context is not available, refer to section 17.6.5 of the EJB 2.0 Specs.
 
Alibabra Sanjie
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

For a CMT bean, if the transaction attribute is NotSupported or Never, the method executes with an unspecified transaction context. In the case of the Supports attribute, this happens only when the client calls without a transaction context.


I believe that it's the opposit, in NotSupported or Never case, the method executes without a transaction context, and in the case of supports attribute, the method executes with unspecified transaction context. Correct me if I am wrong.
 
Seema Manivannan
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Unspecified transaction context´┐Ż refers to the cases where the EJB architecture does not fully define the transaction semantics of an enterprise bean method execution.
If the transaction attribute is "NotSupported" or "Never", even if the client method executes in a transaction context, it is not propogated to the bean. So the bean method always runs in an unspecified transaction context. If the attribute is "Supports", and the client method does not execute in a transaction context, then also this is the case.
Hope this helps.
Thanks
Seema
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic