Hi All, I was going through "Entity Beans are Persistent" chapter in HF EJB and found this following doubt. In the page 281, i read, "ejbCreate () will be called on beans in the pool. Container does not make a new entity bean" I couldnt understand above sentence. Can anybody explain how it works?
Hi Gowda When the client want to insert an entity into persistant storage,(database) it calls create(..) which in turns container pulls the bean instance (which just holds the entity context) and passes the arg provided by the client in create method by calling ejbCreate(..)on the bean instance in this method the bean provider assign the value to the persistant feild of the bean which makes the primary key and then it insert the entity and assign this primary key to the EntityContext & EJBObject and now this entity bean instance represent the the inserted entity in database. Hope it clears your doubt..
Awishek Kr Sinha<br />SCJP 1.4<br />SCBCD 1.3
posted 12 years ago
Thank you guys
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop