This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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?
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 :-).
"I believe in coyotes and time as an abstract Explain the change the difference between What you want and what you need there's the key"
Joined: Mar 16, 2004
Can I say that, an eneity bean is either in pool or in cache. Is there any other place they can go?
Joined: Feb 02, 2004
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