Reconnect and ReconnectTestCase

Help
Andrey
2003-02-14
2003-02-18
  • Andrey

    Andrey - 2003-02-14

    Hi. I was trying to handle connection problems. In case of disconnect it loads CPU 100%. Than I was trying to do ReconnectTestCase. After bringing 3999 server down case finished without any messages.

    I am using latest UberMQ

     
    • Jimmy P

      Jimmy P - 2003-02-17

      Hi there, this was broken in the 2.1.2 release. Please try the 2.1.4 release - there is a new fix for reconnection that should address your problems.

      -james

       
    • Andrey

      Andrey - 2003-02-18

      I am sorry. Both cases still not working. The most bothering is CPU 100% load.

       
      • Jimmy P

        Jimmy P - 2003-02-18

        hi, can you give me a better description of your circumstances? I haven't observed this behavior.

        j

         
    • Andrey

      Andrey - 2003-02-18

      My code

      public static void main(String[] args) {     
              Utility.getLogger().setLevel(Level.ALL);
              Handler handler=new ConsoleHandler();
              handler.setLevel(Level.ALL);
              Utility.getLogger().addHandler(handler);
             
              try {
                  TopicConnectionFactory f=new UnicastConnectionFactory(args[0]);
                  final TopicConnection c=f.createTopicConnection();
                         
                  TopicSession s=c.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
                  final Topic theTopic = s.createTopic("messages");
                             
                  TopicSubscriber sub = s.createSubscriber(theTopic, null, true);
                  sub.setMessageListener(new MessageListener() {
                      public void onMessage(Message p0) {
                          try {
                              System.out.println(" received message on " + theTopic.getTopicName());
                          } catch (JMSException je) {
                              je.printStackTrace();
                          }
                      }               
                  });
                 
                  c.start();
                 
              } catch (JMSException jmse) {
                  jmse.printStackTrace();
              }
             
             
          }

      My LOG

      Feb 18, 2003 2:21:26 PM com.ubermq.jms.client.unicast.FailoverConnectionDescriptor parseFailoverSpec
      FINE: parsed failover URL as [live-oes-gate/172.31.101.78:3999]
      Feb 18, 2003 2:21:27 PM com.ubermq.kernel.AbstractConnectionInfo sendEvent
      FINE: sending connection event CONNECTION_CONNECTED
      Feb 18, 2003 2:21:41 PM com.ubermq.kernel.AbstractConnectionInfo sendEvent
      FINE: sending connection event CONNECTION_IO_EXCEPTION
      Feb 18, 2003 2:21:41 PM com.ubermq.jms.client.impl.Connection sendEvent
      FINE: sending connection event CONNECTION_IO_EXCEPTION
      Feb 18, 2003 2:21:41 PM com.ubermq.kernel.AbstractConnectionInfo sendEvent
      FINE: sending connection event CONNECTION_CLOSED
      Feb 18, 2003 2:21:41 PM 
      FINER: THROW
      java.net.NoRouteToHostException: No route to host: connect
              at sun.nio.ch.Net.connect(Native Method)
              at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:457)
              at com.ubermq.jms.client.unicast.UnicastClientSession.connect(UnicastClientSession.java:64)
              at com.ubermq.jms.client.impl.Connection.reconnect(Connection.java:180)
              at com.ubermq.jms.client.impl.Connection.reconnect(Connection.java:170)
              at com.ubermq.jms.client.impl.Connection$2.run(Connection.java:384)
              at java.lang.Thread.run(Thread.java:536)

      What i do is just physically disconnect network

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks