[ http://jira.activemq.org/jira//browse/AMQ-641?page=comments#action_35779 
] 

james strachan commented on AMQ-641:
------------------------------------

OK I'm with you now - you are happy for the method to be synchronous - and when 
there is a network problem you want it to fail with an exception right? Your 
issue appears to be that the amount of time before a network error becomes 
apparent is too long right?

In that case - I'd take off the failover: prefix and just ensure that you set 
the TCP timeouts  to something small enough so you get an error in whatever 
timeframe suits you.

http://activemq.org/TCP+Transport+Reference

if you try the latest SNAPSHOT build, we have a 'connectionTimeout' property 
that sets the maximum amount of time you are prepared to wait before you 
declare a TCP socket connection failed.

So try

tcp://localhost:61616?connectionTimeout=1000&soTimeout=1000

then you should get an error within a second of trying to connect/send if there 
is a network error.

>  JMS is a asynchronous interface ,blocking is not allow.
> --------------------------------------------------------
>
>          Key: AMQ-641
>          URL: http://jira.activemq.org/jira//browse/AMQ-641
>      Project: ActiveMQ
>         Type: Bug

>   Components: JMS client, Connector
>     Versions: 3.2.2, 4.0 M4
>  Environment: winxp jdk1.4.2 jdk 1.5.6
>     Reporter: tao

>
>
> If I use failover:tcp//.... in the jms client,
> That all method will be blocked when net or activemq error.
> This  is not a good idea.My application will be blocked. 
> And If I use tcp//.... in the jms client,Sometimes ,send(message) method will 
> be blocked,also not return.
>  JMS is a asynchronous interface ,blocking is not allow at any condition.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.activemq.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to