• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity EJB instances at startup

 
Ganna Patil
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a entity bean Employee. There are 10,000 records in Employee table. The container need not load that many entities. The container may load, say, 200 entities only. These beans don't actually represent the data at this time. It's when the user calls a biz. method, on entity bean, the data is loaded into a entity bean.

At what point container loads the entities in a pool? What decides, how many beans of a entity to load in a entity pool?

For stateless session beans we have DD elements to specify the no. of beans at starup, maximum no. of beans in pool, etc. Do same elements work for entity beans?

Thanks
Ganna
 
v Gupta
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You are right, incase of Stateless beans we can specify how many bean instances we want at startup, but in case of Entity beans it's been taken care by container.
All the finder methods are executed in the pooled state of the bean and still it depends upon container whether to load all the data after executing finder method(active loading) or delay it(lazy loading) till any business method is called.

We can only specify the maximum bean pool size taking performance into consideration.


Cheers
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this thread for a similar discussion that you might find useful.
 
G Patil
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gupta, and Chris

Thank you

Ganna Patil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic