Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

stateful CMT, calls from ejbCreate

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have failed a question on http://jdiscuss.com/ that I don't understand after seeing the specification.

According to the specification, in a stateful session bean CMT, on its ejbCreate method, I could have access to other enterprise bean (page 80). But, according to the page 76, ejbCreate runs with an unspecified transaction.

If I can't protect these calls defining a transaction attribute from this ejbCreate, why can I perform methos on other enterprise beans?

Thank you in advance.

Page 80 allowed operations stateful session bean CMT

ejbCreate
ejbRemove
ejbActivate
ejbPassivate
SessionContext methods: getEJBHome,
getEJBLocalHome, getCallerPrincipal,
isCallerInRole, getEJBObject,
getEJBLocalObject
JNDI access to java:comp/env
Resource manager access
Enterprise bean access


Page 76

A session bean�s newInstance, setSessionContext, ejbCreate, ejbRemove, ejbPassivate,
ejbActivate, and afterCompletion methods are called with an unspecified transaction
context. Refer to Subsection 17.6.5 for how the Container executes methods with an unspecified
transaction context.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic