It seems that when the TCPTransport thread stops after losing its connection,
there is no other thread that gets activated in time to keep the program
alive. Here is a workabound that fixes this problem:

If I create a thread in my main that stays alive, failover works well. Here
is my main:

  public static void main(String[] args) throws Exception {
    new Thread(new Runnable(){
      public void run() { 
        while(true){
          try {
            Thread.sleep(100);
          } catch(Exception e){}
        }
      }
    }).start();
    new
ClassPathXmlApplicationContext("com/mycom/server-applicationContext.xml");
  }



--
View this message in context: 
http://www.nabble.com/Failover-failure--t1338117.html#a3613269
Sent from the ActiveMQ - User forum at Nabble.com.

Reply via email to