activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim_Cross <jimcross1...@googlemail.com>
Subject Re: Orphan connections from .NET clients
Date Mon, 25 Jun 2007 10:57:46 GMT

Hi Chris,

My shutdown code looks like this, but I still get the problem:

                if (consumer != null)
                {
                    consumer.Close();
                    consumer.Dispose();
                }
                
                if (session != null)
                {
                    session.Close();
                    session.Dispose();
                }
                
                if(connection != null)
                {
                    connection.Stop();
                    connection.Close();
                    connection.Dispose();
                }


Are you doing anything different to that?


Dris wrote:
> 
> Have you tried explicitly calling connection.Dispose() before exiting your
> program? To get round this problem I just called Close() and Dispose() on
> every NMS object that exposed either or both those methods and it seemed
> to work for me. I suspect that just disposing of the connection may be
> enough to do the job though. I would be interested to know what happens
> for you. 
> 
> Chris
> 
> 

-- 
View this message in context: http://www.nabble.com/Orphan-connections-from-.NET-clients-tf3879502s2354.html#a11284483
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message