Originally posted by Chander Puri:
HFEJB on Pg 94 has a picture that shows Step 5 where the call to create() method is shown in steps : The services kick in and the bean is created followed by EJBObject is made.
But on Pg 100, in the Architectural Overview :Creating a Stateful Session Bean, the process is shown reversed. It shows that first the EJBObject is created for the bean and then the bean is instantiated.
Which one is the correct one to be followed or there is something which I have misread/misinterpreted.
I think the order doesn't really matters, unless until the container gives the bean the beanness. Here it matters, because depending on the different moments in the bean lifecycle, the bean class can perform some operation rather than others.
The important moment is when the Container invokes setSessionContext() and ejbCreate(), linking bean instance, EJBObject and SessionContext together.
Marco
Marco Tedone<br />SCJP1.4,SCJP5,SCBCD,SCWCD