• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

How many Entity Beans required  RSS feed

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on the server vendor could be one or many, entity beans can be pooled like session beans.
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!