I've been trying to create an application that stores over 20,000 CPM beans within a single transaction. I am calling a Session bean with the RequiresNew transaction type, and I notice the transaction commits after the method completes, and the records appear in the database (albeit quite slowly... but I'm aware of the CMP tradeoff so that's okay).
Now. It seems, even though I've created the objects, and don't hang onto references to them, the container grows to quite a large size, and doesn't ever seem to shrink. Then it eventually runs out of memory. Sometimes I even see the following emitted on the console:
16:32:34,914 WARN [AbstractInstanceCache] Unable to passivate due to ctx lock,
16:33:18,207 WARN [AbstractInstanceCache] Unable to passivate due to ctx lock,
How can I perform massive data input with CMP without the memory penalties? Is there a better way to do this (other than Hibernate or raw JDBC... which I will be moving to soon if I can't get JBoss CMP to do what I need.)
Thanks in advance.