| Author |
Stateless session bean ejbCreate()
|
Marcelo Ortega
Ranch Hand
Joined: May 31, 2005
Posts: 519
|
|
How is it that a stateless session bean can access it's EJBObject from it's ejbCreate() method? Judging by its lifecycle, the EJBObject is created when the client invokes create(), and the bean itself is created when ever the container feels like it. Is it that the container allows it to access a temporary EJBObject or something? Regards.
|
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD, SCEA/OCMJEA
Live life to an interface, not an implementation!
|
 |
Makesh Kumar Ramakrishnan
Ranch Hand
Joined: Jan 07, 2006
Posts: 88
|
|
When the ejbCreate method is called, already newInstance and setSessionContext methods are executed.. So new object is created and its assigned with SessionContext. When you use SessionContext to get EJBObject in ejbCreate, you get the object which would be the same as returned by create method of Home object. Please correct me if i am wrong Makesh
|
Makesh<br /> <br />SCJP | SCWCD | SCBCD | SCEA
|
 |
 |
|
|
subject: Stateless session bean ejbCreate()
|
|
|