File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes stateful CMT, calls from ejbCreate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "stateful CMT, calls from ejbCreate" Watch "stateful CMT, calls from ejbCreate" New topic
Author

stateful CMT, calls from ejbCreate

David Crecente
Greenhorn

Joined: Nov 24, 2006
Posts: 7
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: stateful CMT, calls from ejbCreate