aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Question on collection of Entity references Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Question on collection of Entity references" Watch "Question on collection of Entity references" New topic
Author

Question on collection of Entity references

Vidyasagar Guduru
Greenhorn

Joined: Apr 17, 2006
Posts: 26
There is an Employee Entity bean and one of its finder method, say findByAge()returns the collection of Employee objects whose age is < 40.

Application server´┐Żs Bean pooling setup for that bean is minimum 2 beans and maximum 10 beans.

Suppose the above method return 100 objects in the collection, my question is how the Application server or EJB container handles this situation.

What exactly that collection object will have 100 references to the Employee EJB object or 100 EJB objects.

I don't think Application server will create 100 Entity beans so how this will be handled.

I am thinking when the client is iterating each bean, that time container creates the corresponding entity and once the iterator points to the next object the current object will be pooled.

Please can any one explain how this will be handled.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on collection of Entity references