I recently experienced a few memory problems with my apps being deployed on JBoss 3.0.7/Jetty/Hypersonic.
I'm now trying to reproduce the problem at a simpler scale to try to understand it.
For my first test, I used the jboss cmp2 demo and added a simple test to the CrimePortalTest
for (int i = 0; i < 1000000; ++i) {
Gangster g = gangsterHome.create(new Integer(1000+i), "a", "b");
g.remove();
}
That invariably lead to an out of memory exception. My (uneducated) guess is that the bean cache gets to big.
I then tried to change the max-capacity of the standard CMP 2.x EntityBean container config to 10000 (in standardjboss.xml) But then the system fails with the following exception:
[junit] javax.ejb.CreateException: Error checking if entity exists:org.jboss
.util.NestedSQLException: Could not enlist in transaction on entering meta-aware
object!javax.transaction.SystemException: Could not enlist XAResource!javax.tra
nsaction.RollbackException: Already marked for rollback; - nested throwable: (ja
vax.resource.ResourceException: Could not enlist in transaction on entering meta
-aware object!javax.transaction.SystemException: Could not enlist XAResource!jav
ax.transaction.RollbackException: Already marked for rollback)
That, I surely can't explain.
Any one with the same experience and/or would be able to explain what's happening and how to work around this?
Thanks,
Eric