From activemq-users-return-17-apmail-geronimo-activemq-users-archive=geronimo.apache.org@geronimo.apache.org Wed Jan 04 12:19:05 2006 Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 83544 invoked from network); 4 Jan 2006 12:19:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Jan 2006 12:19:04 -0000 Received: (qmail 78189 invoked by uid 500); 4 Jan 2006 12:19:04 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 78169 invoked by uid 500); 4 Jan 2006 12:19:04 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 78160 invoked by uid 99); 4 Jan 2006 12:19:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2006 04:19:04 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of james.strachan@gmail.com designates 64.233.162.205 as permitted sender) Received: from [64.233.162.205] (HELO zproxy.gmail.com) (64.233.162.205) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2006 04:19:02 -0800 Received: by zproxy.gmail.com with SMTP id 13so2737579nzp for ; Wed, 04 Jan 2006 04:18:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=ObjyN7WNq0mgVIvUjznsQ7EBay3NAgTSF9ap14gfXV9VwI8iEn0z1ho6an5nMmQFUogT4LMrtOTuONMm0Jd2CCcZz+PTnqZT+e+VZeO/T0kapSM61xdI+uU6hdtR0yCDvmYIU5m9ZaowOv8/z4/c6O9PSGZlKFr2+ycI2ti+ZVk= Received: by 10.65.119.10 with SMTP id w10mr789457qbm; Wed, 04 Jan 2006 04:18:51 -0800 (PST) Received: from ?192.168.0.3? ( [82.45.246.79]) by mx.gmail.com with ESMTP id e18sm236119qbe.2006.01.04.04.18.50; Wed, 04 Jan 2006 04:18:51 -0800 (PST) In-Reply-To: <53bf01200601031439l6c6e352dm7b37998bf95a9286@mail.gmail.com> References: <53bf01200601031439l6c6e352dm7b37998bf95a9286@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0AFB6A14-F7C8-4521-A2C8-F3CEB7B1537F@gmail.com> Cc: activemq-users@geronimo.apache.org Content-Transfer-Encoding: 7bit From: James Strachan Subject: Re: [activemq-user] Test a JMS connection Date: Wed, 4 Jan 2006 12:18:48 +0000 To: user@activemq.codehaus.org X-Mailer: Apple Mail (2.746.2) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 3 Jan 2006, at 22:39, Ben Lindahl wrote: > Hey all, > > Is there a non-provider-specific way to test an existing JMS > connection? ( > i.e., I want to know whether the connection has gone down since I > originally > obtained it). Right now, I'm doing createTopicSession and > reconnecting if I > get a JMSException. No there's not I'm afraid. Your solution seems reasonable to me. BTW if you want you can use a JMS provider which auto-reconnects on connection failure for you, so you don't need to perform a blocking request-response each time you want to use a connection to check if its still active. http://activemq.org/How+can+I+support+auto+reconnection James ------- http://radio.weblogs.com/0112098/