Guys, I really need your help... May be my question is Junk... but, please try to spend some time on this. I was trying to understand how entity context is implemented by the container. it has methods to fetch the primary key related to the bean instance... but, i was wondering how does it know to which bean instance it is currently related to. so, when ever a bean is swapped out and swapped in with different DB Data how come context retrieves the correct primary key?
Hi raghavendra , Whenever the container creates the bean instances it gives it a EntityContext and places the bean in the pool.
After say user calls the create on the home interface the container will pull the bean from the pool call the ejbCreate and then will insert the record in the database. After the record has been inserted the container will create a EJBObject for the same and updates the EntityContext with the new primary key . The EJBObject created will be returned back to the client.
hope that helps [ April 20, 2005: Message edited by: sawan parihar ]
Sawan<br />SCJP,SCWCD,SCBCD<br /> <br />Every exit is an entry somewhere.
I'm not sure if I approve of this interruption. But this tiny ad checks out: