• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How many Entity Beans required

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic