Given that a bean instance can move from the Pooled state to the Ready state under two circumstances: 1) via creation 2) via activation how does the container decide whether to "create" the bean or to "activate" the bean. In other words how does the container decide whether to call ejbCreate() or ejbActivate() on the Pooled bean instance.
And from a lifecycle standpoint, ejbCreate will *only* be called as a result of a client calling create to generate a new entity. The container doesn't get to decide when it happens - it is purely a client-driven response. ejbActivate happens whenever the container decides to allocate an instance to represent a specific entity (hence the assorted HFE photos & cartoons in chapters 5/6 about actors). That could happen during a find (ejbFind) operation, or as Sudhir already mentioned, during the processing of a business method provided via the component interface. It could also happen during a remove (ejbRemove), because the entity data must be loaded into the instance before the removal can be processed.
Reid - SCJP2 (April 2002)
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
Devious Experiments for a Truly Passive Greenhouse!