File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Entity EJB instances at startup 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 » Java » EJB and other Java EE Technologies
Bookmark "Entity EJB instances at startup" Watch "Entity EJB instances at startup" New topic
Author

Entity EJB instances at startup

Ganna Patil
Greenhorn

Joined: May 24, 2004
Posts: 1
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

Joined: May 26, 2004
Posts: 8
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

Joined: Jul 18, 2001
Posts: 2712
See this thread for a similar discussion that you might find useful.
G Patil
Greenhorn

Joined: May 27, 2004
Posts: 1
Gupta, and Chris

Thank you

Ganna Patil
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity EJB instances at startup