-
1. Re: Instance Cache/ Pool Configuration - JBoss3.0.0
dsundstrom Sep 11, 2002 5:36 PM (in response to udaydg)BTW, this is a question for the EJB/JBoss forum.
The current cache implementation uses hard references to objects. In the future I would like to have an optional cache that uses softreferences. Until then, you will have to test (size) you application by hand as the optimal cache size is very dependent on the size of you objects and size of the heap allocated to Java. You can estimate this by hand by counting the size of fields in the class and dividing that into the portion of the heap you want to use for thie entity's cache. -
2. Re: Instance Cache/ Pool Configuration - JBoss3.0.0
integ Sep 11, 2002 11:35 PM (in response to udaydg)Does this mean that if my default cache size is 1million (as is in standardjboss.xml), my entity beans will keep piling up till it goes out of memory? (say the beans are large and reaches my JVM mem setting before 1 million) If my uderstanding is correct, then there is no correlation between physical memory and the instance cache size/max capacity of beans?
-
3. Re: Instance Cache/ Pool Configuration - JBoss3.0.0
dsundstrom Sep 12, 2002 1:50 AM (in response to udaydg)You are correct. In most applications on most servers you run into 1 million (or have less then 1 million rows) before you run out of memory.
-
4. Re: Instance Cache/ Pool Configuration - JBoss3.0.0
integ Sep 12, 2002 3:04 PM (in response to udaydg)Can you explain what do you mean by 'optional cache' or hard references v/s soft references to objects?
Thanks. -
5. Re: Instance Cache/ Pool Configuration - JBoss3.0.0
dsundstrom Sep 12, 2002 4:21 PM (in response to udaydg)The cache implementation is pluggable in JBoss so by 'optional cache' I ment another implementation that is not the default. Hard references are normal Java references soft references are instances of java.lang.ref.SoftReference, which is a special JVM object the the JVM will clear before an OutOfMemoryException is thrown. Read the javadocs for more info.