I have a confusion on ejbCreate method of stateless session bean that is when container calls ejbCreate to create a bean for pool EJBObject is not created then how can one permitted to call getEJBObject() method on SessionContext in ejbCreate() method.
A good question you have asked. When we are deploying a bean the home object would be created and bind to a JNDIName in the JNDI NameSpace, like when creating a pool for particular stateless sessionbean, first it creates the ejbobject and ejblocalObject, then only container creates the pool.
Its upto container dependent only one or more ejbObject and ejblocalObject for a particular stateless session bean.
Because these objects are only present in server(If container provides only one ejbobject and ejblocalobject), we may thing like servlet(multi thread model).
Thanx for the answer.. ok then it means every instance in a pool is having an EJBObject but when a client calls create method on stateless bean's home an EJBObject is created then will the chosen(from pool) EJB's EJBObject be replaced by the EJBObject created by the create call? [ July 12, 2005: Message edited by: Soni Prasad ]
To Kathy and Bert: you might want to include that answer as an addition to "there are no Dumb Questions" into HFEJB. I have looked up the spec and the javadoc and they really do not explain this topic well.
"The UrlyBird catches the certificate. And he's gonna FlyByNight"<br /> <br />SCJP 1.2/5.0, SCJD, SCBCD, SCWCD, SCEA
Joined: Mar 09, 2005
Thank you so much Wei-ju Wu for providing this link.