• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Session bean ejbCreate method

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
According to tHe EJB spec:

"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."

How come Resource Manager access and Enterprise bean access are allowed in the ejbCreate, ejbRemove, ejbActivate and ejbPassivate methods on a STATEFUL session bean. THe spec also says:

"The getRollbackOnly and setRollbackOnly methods of the SessionContext interface should be used only in the session bean methods that execute in the context of a transaction. SInce the ejbCreate, ejbRemove, ejbActivate and ejbPassivate methods of a STATEFUL session bean execute in an unspecified transaction context the getRollbackOnly and setRollbackOnly methods should not be called from these methods."

If the ejbCreate, ejbRemove, ejbActivate and ejbPassivate methods of a STATEFUL session bean execute in an unspecified transaction context, how can they be allowed to access the Resource Manager and other Enterprise beans?

Please clarify.


Thanks very much,
 
For my next trick, I'll need the help of a tiny ad ...
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic