• 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

Entity Bean Explosion?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The project I am handling has the following features:
1. Quite a lot(hundreds of thousand) entity beans will be created
2. And they will NEVER be removed
The project is to enhance a legacy project which used JDBC directly to persist data.
I also understand that EJB will be passivated and be put into the pool so that App Server will not be out of memory.
The question is that, even if an EJB is passivated, will it still occupy some resources on App Server? If yes, what kind of resource is occupied? If there are several million EJBs created and then passivated, will they exhaust resources of App Server since they will never be removed?
In the legacy system, this is not the problem. Because it used JDBC, all data only exists in DB, not App Server. I am going to enhance it using EJB. But due to the above considerations, I am hesitating whether to use it or not since it may require a huge amount resource to be added to App Server. (BTW, I am using JBOSS as App Server)
Any suggestions?
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tao,
First, check out this link on Entity Bean life cycle:
The Life Cycles of Enterprise Beans
Second, in JBoss, you can see and configure the caching behavior of all the different EJB types in the conf/standardjboss.xml For example, the default caching settings for a Standard BMP Entity Bean look like:

These settings are explained in JBoss purchasable documentation, which I highly recommend. I'd quote some of it here, but I don't want to get in trouble :-).
 
tao gu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I say that, an eneity bean is either in pool or in cache. Is there any other place they can go?
 
Jason Stull
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's a pretty litle sight that sums life cycle up pretty well. It even includes some tuning specific info for Entity Beans. It explains fairly well the roles of pooling and caching: Best Practices to improve performance in EJB
reply
    Bookmark Topic Watch Topic
  • New Topic