Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 12768 invoked from network); 21 Jun 2007 07:37:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jun 2007 07:37:05 -0000 Received: (qmail 72409 invoked by uid 500); 21 Jun 2007 07:37:07 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 72377 invoked by uid 500); 21 Jun 2007 07:37:07 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 72368 invoked by uid 99); 21 Jun 2007 07:37:06 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2007 00:37:06 -0700 Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2007 00:37:02 -0700 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1I1HDJ-0000oK-LB for users@activemq.apache.org; Thu, 21 Jun 2007 00:36:21 -0700 Message-ID: <11228145.post@talk.nabble.com> Date: Thu, 21 Jun 2007 00:36:21 -0700 (PDT) From: Jim_Cross To: users@activemq.apache.org Subject: Re: Orphan connections from .NET clients In-Reply-To: <46681E6D.1050405@blackspark.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jimcross1981@googlemail.com References: <4666F712.6000201@blackspark.com> <46681E6D.1050405@blackspark.com> X-Virus-Checked: Checked by ClamAV on apache.org Gaurav, Did you ever find a workaround for this? I've hit the same problem with NMS and ActiveMQ 4.1.1 (also seems to affect 4.1.0 but not 4.0.2), and it looks like it could be a show stopper for us. Cheers, Jim Gaurav Hariani-2 wrote: > > yes > > Hiram Chirino wrote: >> Odd. look like a bug. You using 4.1.1? >> >> >> On 6/6/07, Gaurav Hariani wrote: >>> Since James and Hiram are back on the list ... I thought I'd repost >>> this- >>> >>> We are facing a problem of orphan connections to ActiveMQ. A simple .NET >>> client that only creates a connection/session and then closes and exits, >>> still shows up in jconsole. >>> It is possible to stop it manually in jconsole. >>> >>> Below is an example to reproduce the problem: >>> >>> >>> The following code creates a connection to an OpenWire transport >>> connector, waits for 1 second and then closes the session/connection. >>> Looking at JConsole ... ActiveMQ reports the connection as open. Too >>> many open connections and ActiveMQ stops processing messages. >>> >>> However if the connection is not closed by the application and the >>> application is killed using Ctrl-C ... then ActiveMQ closes the >>> connections. >>> >>> Is there something obvious that I'm doing wrong or is this a bug in the >>> TcpTransport code? >>> >>> >>> >>> using System; >>> using System.Threading; >>> using NMS; >>> >>> namespace ActiveMQ { >>> class TestMain { >>> >>> static void Main(string[] args) { >>> >>> Uri uri = new Uri("tcp://activemqserver:61616"); >>> >>> ConnectionFactory factory = new ConnectionFactory(uri); >>> IConnection connection = null; >>> ISession session = null; >>> >>> try { >>> connection = factory.CreateConnection(); >>> Console.WriteLine("Connection Created"); >>> >>> connection.ClientId = "[test1] " + connection.ClientId; >>> >>> session = connection.CreateSession(); >>> Console.WriteLine("Session Created"); >>> >>> Thread.Sleep(1000); >>> >>> } finally { >>> session.Close(); >>> connection.Close(); >>> Console.WriteLine("Connection Closed"); >>> } >>> } >>> } >>> } >>> >> >> > > -- View this message in context: http://www.nabble.com/Orphan-connections-from-.NET-clients-tf3879502s2354.html#a11228145 Sent from the ActiveMQ - User mailing list archive at Nabble.com.