• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Access to resource manager in CMTSFB

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello:
This is my first post and as english is not my mother tongue the less i write -> the less i'll be wrong ;-). Here we go:
The spec says that it's allowed to access a Resource manager in ejbCreate, ejbRemove..ejbPassivate methods of a CMTSFB. Oks, but after says:

Accessing resource managers and enterprise beans is disallowed in the session bean methods
for which the Container does not have a meaningful transaction context or client security context.


and

The ejbCreate<METHOD>, ejbRemove, ejbPassivate, and ejbActivate methods
of a session bean with container-managed transaction demarcation execute with an unspecified
transaction context. Refer to Subsection 17.6.5 for how the Container executes methods
with an unspecified transaction context.


Any help?
Thanks, javi.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In SFSB, the following methods ejbCreate, ejbActivate, ejbPassivate, ejbRemove have access to security context, which allows them to have access to another beans method or resource manager (although methods run in "unspecified Tr context"... read the lines in Spec carefully, it uses the key word 'OR').
Hope, this answers to your question.
 
Javi Moreno
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello:
mmmmmmmmmmm oks, then (if it means transaction context OR security context) why can't you access a resource manager from afterComptetion(), this method runs with an unspecified transaction context but DOES has security context..and the specs says it can't.
Thanks again!
 
Javi Moreno
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have just read it in one mock exam:

The table 2 on page 80 on EJB specification states that an enterprise bean may be accessed in the ejbCreate method; however, since a transaction context is unspecified for this method, the behaviour of executing ejbCreate() is not guaranteed by the container


:-)
Chao!
[ April 30, 2004: Message edited by: Javi Moreno ]
 
Your mother is a hamster and your father smells of tiny ads!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic