• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Question on collection of Entity references

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic