I am not understanding this statement 'collection of primary keys' ???
Hi Kri,
Please read it as a collection of remote interfaces.
What will be the internal representation of records in the memory. When i need some record Will i need to use ejbFind() method again.
It might be no record representation in memory, after the finder runs. Here there are my thoughts: entity EJBs won�t leave the pooled state after a finder. The finder only returns a list of remote interfaces to the client. In a way a found bean follows the same protocol as a passivated bean; it is activated when the client invokes a business method on that bean. My point is that after the finder runs I don�t expect much memory allocation or re-allocation to happen within the container. Does the container feel that it needs more bean instances in the pool? That�s fine though, the container will create more instances. The point is that a bean instance is a lightweight component and it doesn�t waste resources (sockets, memory, connections, etc). However if the client loops through all remote interfaces returned by the finder and invokes business methods, then the story will drastically change. The container has no choice but to activate all those bean instances; did the finder returned 1000 beans? Then the container will instantiate 1000 heavyweight bean objects and memory will be consumed, sockets will be used, locking will be acquired, etc. After this point you might think that your records are represented in memory exactly as a set of 1000
EJB objects. Well this might or might not be true, because while the client is looping through all the 1000 beans invoking business methods, the container might decide to passivate some of them. However if you enlist your looping within a transaction then guaranteed you�ll have 1000 beans in memory.