EJB instances in memory forever.
I noticed that EJB instances after they have been created/found stay in memory forever. When working with considerably big database it even caused OutOfMemory error. Profiler have shown that those instances are stored in org.objectweb.jonas_ejb.container.JEntityFactory private HashMap pklist (line 814). It is easy to see from the source code that instances removed from this Map only on EJB.remove.
Even after passivation they stay in this Map. It happens in method reduceCache() (line 772), but after beans passivated they are not removed from the pklist.