Package org.hornetq.core.client.impl

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal.numConnections()


   public void testSingleConnectorSingleServerConnect() throws Exception
   {
      ServerLocatorInternal locator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithoutHA(createTransportConfiguration(isNetty(), false, generateParams(0, isNetty())));
      ClientSessionFactoryInternal csf = (ClientSessionFactoryInternal) locator.connect();
      assertNotNull(csf);
      assertEquals(csf.numConnections(), 1);
      locator.close();
   }

   public void testMultipleConnectorSingleServerConnect() throws Exception
   {
View Full Code Here


            createTransportConfiguration(isNetty(), false, generateParams(3, isNetty())),
            createTransportConfiguration(isNetty(), false, generateParams(4, isNetty()))
      );
      ClientSessionFactoryInternal csf = (ClientSessionFactoryInternal) locator.connect();
      assertNotNull(csf);
      assertEquals(csf.numConnections(), 1);
      locator.close();
   }

   public void testMultipleConnectorSingleServerConnectReconnect() throws Exception
   {
View Full Code Here

            createTransportConfiguration(isNetty(), false, generateParams(4, isNetty()))
      );
      locator.setReconnectAttempts(-1);
      ClientSessionFactoryInternal csf = (ClientSessionFactoryInternal) locator.connect();
      assertNotNull(csf);
      assertEquals(csf.numConnections(), 1);
      locator.close();
   }

   public void testMultipleConnectorSingleServerNoConnect() throws Exception
   {
View Full Code Here

      sf.close();

      Assert.assertEquals(0, sf.numSessions());

      Assert.assertEquals(0, sf.numConnections());
   }


   protected void createConfigs() throws Exception
   {
View Full Code Here

      sf.close();

      Assert.assertEquals(0, sf.numSessions());

      Assert.assertEquals(0, sf.numConnections());
   }

   /**
    * Test that once the transacted session has throw a TRANSACTION_ROLLED_BACK exception,
    * it can be reused again
View Full Code Here

      sf.close();

      Assert.assertEquals(0, sf.numSessions());

      Assert.assertEquals(0, sf.numConnections());
   }

   public void testTransactedMessagesNotSentSoNoRollback() throws Exception
   {
      locator.setBlockOnNonDurableSend(true);
View Full Code Here

      sf.close();

      Assert.assertEquals(0, sf.numSessions());

      Assert.assertEquals(0, sf.numConnections());
   }

   public void testTransactedMessagesWithConsumerStartedBeforeFailover() throws Exception
   {
      locator.setBlockOnNonDurableSend(true);
View Full Code Here

      sf.close();

      Assert.assertEquals(0, sf.numSessions());

      Assert.assertEquals(0, sf.numConnections());
   }

   public void testTransactedMessagesConsumedSoRollback() throws Exception
   {
      locator.setBlockOnNonDurableSend(true);
View Full Code Here

      sf.close();

      Assert.assertEquals(0, sf.numSessions());

      Assert.assertEquals(0, sf.numConnections());
   }

   public void testTransactedMessagesNotConsumedSoNoRollback() throws Exception
   {
      locator.setBlockOnNonDurableSend(true);
View Full Code Here

      sf.close();

      Assert.assertEquals(0, sf.numSessions());

      Assert.assertEquals(0, sf.numConnections());
   }

   public void testXAMessagesSentSoRollbackOnEnd() throws Exception
   {
      locator.setBlockOnNonDurableSend(true);
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.