Hi, I'm using ActiveMQ 4.1.0 and Lingo 1.1. Using the following method, the client can't autoreconnect after ActiveMQ shutdown
Client config: <bean id="jmsFactory" class="org.apache.activemq.pool.PooledConnectionFactory"> <property name="connectionFactory"> <bean class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL"> <value>failover:(tcp://192.168.0.111:61616)?maxReconnectAttempts=0</value> </property> </bean> </property> </bean> 1) Start activemq 2) Start client - now I can see it connected to activemq 3) Shutdown activemq, using kill -9 or Ctrl+C 4) Errors throws in client console: Exception in thread "ActiveMQ Transport: tcp:///192.168.0.111:61616" java.lang.ClassCastException: org.apache.activemq.transport.InactivityMonitor$1 at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.compareTo(ScheduledThreadPoolExecutor.java:189) at edu.emory.mathcs.backport.java.util.PriorityQueue.remove(PriorityQueue.java:507) at edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.remove(DelayQueue.java:379) at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.remove(ScheduledThreadPoolExecutor.java:707) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.remove(ThreadPoolExecutor.java:1582) at org.apache.activemq.thread.Scheduler.cancel(Scheduler.java:55) at org.apache.activemq.transport.InactivityMonitor.stopMonitorThreads(InactivityMonitor.java:176) at org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:149) at org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:150) at java.lang.Thread.run(Thread.java:595) 5) Start activemq 6) No signal from Client about reconnecting. Tried to send a message, client didn't received The autoreconnect is seen only in this situation: 1) Start client 2) In client console, it complains about conenction failed and tries to reconnect 3) Start activemq 4) Client reconnected successfully How to achieve the first situation? Trung -- View this message in context: http://www.nabble.com/How-to-have-autoreconnect-in-this-situation-tp14248871s2354p14248871.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.