we use jboss 5.1.0 and default jboss-remoting that comes with it (2.5.1). We have some OutOfMemoryExceptions and the issue seems to be coming from BiSocketServerInvoker. here is the info from Eclipse MAT
7,084 instances of "org.jboss.remoting.transport.bisocket.BisocketServerInvoker", loaded by "org.jboss.classloader.spi.base.BaseClassLoader @ 0x14d385a8" occupy 56,080,264 (11.62%) bytes. These instances are referenced from one instance of "java.util.TimerTask", loaded by "<system class loader>"
org.jboss.classloader.spi.base.BaseClassLoader @ 0x14d385a8
7084 of those objects which does not look normal. I think this number is growing when we have our web based UI running with is written in RichFaces.
Let me know if you need any more information about the environment.
To me it looks like a memory leak originating in jboss-remoting. Could anyone help resolving the issue?
Could you take a look at the thread "Problem for Timer of BisocketServerInvoker" (https://community.jboss.org/thread/111400?tstart=0), in particular, the last note, by Andrea Ippolito, and see if it is relevant?
Initially some close() methods were missing but I added them and still it was the issue. (BiSockets getting collected). Then I realised for every message, InitialContext and ConnectionFactory are being instantiated. But all close() methods were called.
I changed the code to get InitialContext and ConnectionFactory once per queue. Now the BisocketServerInvokers are limited in number. But I still did get why BisocketServerInvokers are getting accumulated when I open 1 InitialContext and ConnectoryFactory per message, but still calling all close().