posted 22 years ago
The finder method returns Primary Keys. It is an instance method on an object, so of course the container needs an object instance so it can run the method. So it pulls an object out of the pool.
Now, once your finder returns, the container is done with that instance and can put it back in the pool.
It now has one (or many) primary keys. It gets instance(s) from the pool and activates them and calls ejbLoad to initialize these instances with data for the primary key.
Unless you are trying to write a container, you really don't have to worry about this, except to know that home and finder mehtods are not "business methods". Even though they are run on an instance of the bean, the bean is not "ready" and has no state. So you shouldn't try to do things that a business method would do. Any data initialization you might try to do in a finder will not be saved - it will be lost and overwriten when the container activates/loads that instance again.