Examples of ClientSessionFactoryInternal


Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal

   }

   @Override
   protected ClientSessionFactoryInternal createSessionFactory() throws Exception
   {
      ClientSessionFactoryInternal factory = (ClientSessionFactoryInternal)serverLocator.createSessionFactory(targetNodeID);
      setSessionFactory(factory);

      if (factory == null)
      {
         HornetQServerLogger.LOGGER.nodeNotAvailable(targetNodeID);
         return null;
      }
      factory.setReconnectAttempts(0);
      factory.getConnection().addFailureListener(new FailureListener()
      {

         public void connectionFailed(HornetQException exception, boolean failedOver)
         {
            if (exception.getType() == HornetQExceptionType.DISCONNECTED)
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal

   }

   /* Hook for creating session factory */
   protected ClientSessionFactoryInternal createSessionFactory() throws Exception
   {
      ClientSessionFactoryInternal csf = (ClientSessionFactoryInternal)serverLocator.createSessionFactory();
      csf.setReconnectAttempts(0);
      return csf;
   }
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal

         ClusterConnectionConfiguration config = ConfigurationUtils.getReplicationClusterConfiguration(configuration);

         locator = getFailbackLocator(config);

         ClientSessionFactoryInternal factory = null;

         NodeIdListener listener=new NodeIdListener(nodeId0);

         locator.addClusterTopologyListener(listener);
         try
         {
            locator.setReconnectAttempts(0);
            try
            {
               locator.addClusterTopologyListener(listener);
               factory = locator.connectNoWarnings();
            }
            catch (Exception notConnected)
            {
               return false;
            }

            listener.latch.await(5, TimeUnit.SECONDS);

            return listener.isNodePresent;
         }
         finally
         {
            if (factory != null)
               factory.close();
            if (locator != null)
               locator.close();
         }
      }
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal

   }

   @Override
   protected ClientSessionFactoryInternal createSessionFactory() throws Exception
   {
      ClientSessionFactoryInternal factory = (ClientSessionFactoryInternal)serverLocator.createSessionFactory(targetNodeID);
      setSessionFactory(factory);

      if (factory == null)
      {
         HornetQServerLogger.LOGGER.nodeNotAvailable(targetNodeID);
         return null;
      }
      factory.setReconnectAttempts(0);
      factory.getConnection().addFailureListener(new FailureListener()
      {

         public void connectionFailed(HornetQException exception, boolean failedOver)
         {
            if (exception.getType() == HornetQExceptionType.DISCONNECTED)
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal

         ClusterConnectionConfiguration config = ConfigurationUtils.getReplicationClusterConfiguration(configuration);

         locator = getFailbackLocator(config);

         ClientSessionFactoryInternal factory = null;

         NodeIdListener listener=new NodeIdListener(nodeId0);

         locator.addClusterTopologyListener(listener);
         try
         {
            locator.setReconnectAttempts(0);
            try
            {
               locator.addClusterTopologyListener(listener);
               factory = locator.connectNoWarnings();
            }
            catch (Exception notConnected)
            {
               return false;
            }

            listener.latch.await(5, TimeUnit.SECONDS);

            return listener.isNodePresent;
         }
         finally
         {
            if (factory != null)
               factory.close();
            if (locator != null)
               locator.close();
         }
      }
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal

   }

   @Override
   protected ClientSessionFactoryInternal createSessionFactory() throws Exception
   {
      ClientSessionFactoryInternal factory = (ClientSessionFactoryInternal)serverLocator.createSessionFactory(targetNodeID);
      setSessionFactory(factory);

      if (factory == null)
      {
         HornetQServerLogger.LOGGER.nodeNotAvailable(targetNodeID);
         return null;
      }
      factory.setReconnectAttempts(0);
      factory.getConnection().addFailureListener(new FailureListener()
      {

         public void connectionFailed(HornetQException exception, boolean failedOver)
         {
            if (exception.getType() == HornetQExceptionType.DISCONNECTED)
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal

      locator.setBlockOnDurableSend(true);
      locator.setAckBatchSize(0);
      locator.setReconnectAttempts(-1);
      ((InVMNodeManager)nodeManager).failoverPause = 5000l;

      ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)locator.createSessionFactory();

      final ClientSession session = createSession(sf, true, true);

      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal

      locator.setReconnectAttempts(-1);
      locator.setRetryInterval(500);
      locator.setAckBatchSize(0);
      ((InVMNodeManager)nodeManager).failoverPause = 5000l;

      ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)locator.createSessionFactory();

      final ClientSession session = createSession(sf, true, true);

      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal

      locator.setReconnectAttempts(-1);
      locator.setRetryInterval(500);
      locator.setAckBatchSize(0);
      ((InVMNodeManager)nodeManager).failoverPause = 5000l;

      ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)locator.createSessionFactory();

      final ClientSession session = createSession(sf, true, true);

      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, true);
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal

      locator.setBlockOnDurableSend(true);
      locator.setAckBatchSize(0);
      locator.setReconnectAttempts(-1);
      ((InVMNodeManager)nodeManager).failoverPause = 5000l;

      ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)locator.createSessionFactory();

      final ClientSession session = createSession(sf, true, false, false);

      session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null, 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.