Package org.hornetq.spi.core.protocol

Examples of org.hornetq.spi.core.protocol.RemotingConnection.fail()


         producer.send(message);
      }

      RemotingConnection conn = ((ClientSessionInternal)sendSession).getConnection();

      conn.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      // Wait to be informed of failure

      for (MyListener listener : listeners)
      {
View Full Code Here


         // Now fail the underlying connection

         RemotingConnection connection = ((ClientSessionInternal)session).getConnection();

         connection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

         Assert.assertTrue(session.isClosed());

         Assert.assertTrue(prod.isClosed());
View Full Code Here

      {
         @Override
         public void run()
         {
            System.out.println("failing...");
            forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));
            System.out.println("reconnected!!!");
         }
      };
      t.start();
     
View Full Code Here

      BridgeReconnectTest.log.info("** failing connection");
      // Now we will simulate a failure of the bridge connection between server0 and server1
      Bridge bridge = server0.getClusterManager().getBridges().get(bridgeName);
      RemotingConnection forwardingConnection = getForwardingConnection(bridge);
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      final int numMessages = 10;

      SimpleString propKey = new SimpleString("propkey");

View Full Code Here

      // Now we will simulate a failure of the bridge connection between server0 and server1
      Bridge bridge = server0.getClusterManager().getBridges().get(bridgeName);
      RemotingConnection forwardingConnection = getForwardingConnection(bridge);
      InVMConnector.failOnCreateConnection = true;
      InVMConnector.numberOfFailures = reconnectAttempts - 1;
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      forwardingConnection = getForwardingConnection(bridge);
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      final int numMessages = 10;
View Full Code Here

      InVMConnector.failOnCreateConnection = true;
      InVMConnector.numberOfFailures = reconnectAttempts - 1;
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      forwardingConnection = getForwardingConnection(bridge);
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      final int numMessages = 10;

      SimpleString propKey = new SimpleString("propkey");
View Full Code Here

      // Now we will simulate a failure of the bridge connection between server0 and server1
      Bridge bridge = server0.getClusterManager().getBridges().get(bridgeName);
      RemotingConnection forwardingConnection = getForwardingConnection(bridge);
      InVMConnector.failOnCreateConnection = true;
      InVMConnector.numberOfFailures = reconnectAttempts - 1;
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      forwardingConnection = getForwardingConnection(bridge);
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      final int numMessages = 10;
View Full Code Here

      InVMConnector.failOnCreateConnection = true;
      InVMConnector.numberOfFailures = reconnectAttempts - 1;
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      forwardingConnection = getForwardingConnection(bridge);
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      final int numMessages = 10;

      SimpleString propKey = new SimpleString("propkey");
View Full Code Here

      Bridge bridge = server0.getClusterManager().getBridges().get(bridgeName);
      RemotingConnection forwardingConnection = getForwardingConnection(bridge);
      InVMConnector.failOnCreateConnection = true;
      InVMConnector.numberOfFailures = reconnectAttempts - 1;
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      final int numMessages = 10;

      SimpleString propKey = new SimpleString("propkey");
View Full Code Here

      // Fail again - should reconnect
      forwardingConnection = ((BridgeImpl)bridge).getForwardingConnection();
      InVMConnector.failOnCreateConnection = true;
      InVMConnector.numberOfFailures = reconnectAttempts - 1;
      forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));

      for (int i = 0; i < numMessages; i++)
      {
         ClientMessage message = session0.createMessage(false);
         message.putIntProperty(propKey, i);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.