You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by James Strachan <ja...@gmail.com> on 2006/01/04 13:18:48 UTC

Re: [activemq-user] Test a JMS connection

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/