activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Datacom - Marcelo <marc...@datacom-telematica.com.br>
Subject Reference not released
Date Thu, 19 Oct 2006 14:14:26 GMT
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




Mime
View raw message