aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes accessing resource managers in ejbCreate() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "accessing resource managers in ejbCreate()" Watch "accessing resource managers in ejbCreate()" New topic
Author

accessing resource managers in ejbCreate()

Prashant Neginahal
Ranch Hand

Joined: Sep 14, 2002
Posts: 77
Hi Guys,
I have one doubt regarding accessing resource managers in transaction. EJB spec(page-81) 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.
-------------------------------------------------------------------
But, how can we access resource managers in ejbCreate() and ejbReomve() methods? I know these run in unspecified transaction. So, is this unspecified transaction a 'meaning transaction context'?

Thanks,
Prashant


Thanks, <br />Prashant<br />SCJP, SCBCD
Ana Nava
Greenhorn

Joined: May 25, 2004
Posts: 24
But, how can we access resource managers in ejbCreate() and ejbReomve() methods? I know these run in unspecified transaction. So, is this unspecified transaction a 'meaning transaction context'?


Not in case of Entity Beans. Check out spec 10.5.2
in page 171 under "public PrimaryKeyClass ejbCreate<METHOD>(...);" and
in page 173 under "public void ejbRemove();".
Prashant Neginahal
Ranch Hand

Joined: Sep 14, 2002
Posts: 77
I know this is NOT a case of Entity beans. I am talking about Session beans.

--Prashant
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: accessing resource managers in ejbCreate()