Hi, We use active-mq as one of two JMS server (we use openJMS as a backup solution) and we realize some out-of-memory situations. Running our application in JProfiler we saw every single instance of object that uses JMS is kept hold by active-mq, resulting in a memory leak in our application. We tested this behavior in versions 4.0-M4, RC2 and 4.0.1. Our application consist in many windows that uses publish/subscriber methods to send/receive messages. Once we close a window a dispose method is called wich calls that close method, but these window's instances still remains in memory due to active-mq references to them (the finalizer is never called).

We used to do this to close connections:
public void close() throws JMSException {
       subscriber.close();
       session.close();
       if (connection != null) {
           connection.stop();
           connection.close();
       }
       connection = null;
       session = null;
       subscriber = null;
   }

It works ok with OpenJMS, so is something missing to release all resources and references from active-mq ?

Thanks in advance,

--
MARCELO Ribeiro



Reply via email to