I ran now the same code with SUNs J2EE reference and Pointbase. Memory usage was constant after the first 1000 Beans (initialization). I've been running the test up to 5000 Beans. So it seems to be a jboss-related problem.
100 is the pool size, the default cache size is 1 million in jboss.
Also if you are using hsqldb, its tables are fully loaded into memory unless
you use "create cached table".
The setting is not enough. I have run into the same problem (and reported it) a couple of weeks back. I then tried modifying the container configuration and the read-ahead setting to anything I could image without results.
However, I have seen that Alexey committed some changes in the cache handling. It may be better/fixed in the latest version in CVS (I was using the latest version at the time, but have not updated meanwhile).
Alexey is working on instance-per-transaction which isn't a real cache.
You ain't going to get much help with more info.
Asserting you've done things correctly isn't very useful.
Configuring the cache-size down to 1000 worked wonder. I just uploaded 20000CMPs with -Xmx=32m setting without problems.
Thanks for the help,