wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes How many Entity Beans required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How many Entity Beans required" Watch "How many Entity Beans required" New topic
Author

How many Entity Beans required

Yog Ananth
Greenhorn

Joined: Dec 28, 2004
Posts: 27
I want to insert 1000 records in a transaction so how many entity beans is required, can i do this for a single entity, it causes performance issue.
Daniel Rhoades
Ranch Hand

Joined: Jun 30, 2004
Posts: 186
Depends on the server vendor could be one or many, entity beans can be pooled like session beans.


Drinking more tea is the key...
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Yog,

I want to insert 1000 records in a transaction so how many entity beans is required, can i do this for a single entity, it causes performance issue.

Weblogic for example pools entity ejbs and caches them at the same time. There is however a difference between bean instances in the pool and those cached: unlike pooled instances, the beans in the cache are associated with a client. Of course there is more than that, but I'll consider only this one for now. Beans in the cache could be either in an ACTIVE or READY state. Ready bean are eligible for passivation/activation at any time, using either an LRU or NRU algorithm. Those active are enlisted in a transaction and could not be passivated. Concluding I�ll tell you that in your case if you create 1000 beans within the same transaction, then I have reasons to believe that your container will create exactly 1000 bean instances. Of course different container vendors might have different strategies, but I�d rather expect a behavior similar to the one that Weblogic provides than otherwise. Usually capacity planning and early application profiling could avoid or identify this kind of problems.
Regards.


I think, therefore I exist -- Rene Descartes
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How many Entity Beans required
 
Similar Threads
live customer project involving entity beans
Session Beans & Entity Beans together
Any GUI tool to show EJB info reading from a EJB dep. desc.?
Persistence : third-party ORM's vs EJB 3.0 CMP
Websphere transactions