activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From icfantv <adam.gor...@readytalk.com>
Subject Re: Connection creation timeout setting
Date Fri, 16 Jan 2009 15:27:17 GMT

I'm trying to create a connection such that it will time out if the ActiveMQ
server isn't running rather than blocking indefinitely.  If I do it in a
background thread and it never connects, but rather, blocks indefinitely,
Java provides no way to terminate the thread.

Not to harp on the developers, but this seems like a serious design flaw
especially since underneath it's probably using the Java network stack which
supports connection time outs.

If anyone has any other ideas, I'm open to suggestions or I'm going to be
forced to delve into the code and perhaps implement some type of time out
mechanism on the connection.

--adam


bsnyder wrote:
> 
> On Thu, Jan 15, 2009 at 5:31 PM, icfantv <adam.gordon@readytalk.com>
> wrote:
>>
>> Hi-
>>
>> Did a cursory search but didn't find anything related to this so I
>> apologize
>> in advance if it's been asked and answered - I didn't see it.
>>
>> Is there a way to set a connection timeout on the connection factory
>> class
>> such that the thread doesn't block until a connection is successfully
>> made?
>> I see several timeout related methods in the connection object but don't
>> see
>> anything specifically related to connection timeouts.
> 
> There are no such timeouts on the ActiveMQConnection. What is it that
> you're trying to achieve exactly?
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*");'
> 

-- 
View this message in context: http://www.nabble.com/Connection-creation-timeout-setting-tp21490199p21501819.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message