Package org.hornetq.core.client.impl

Examples of org.hornetq.core.client.impl.ServerLocatorInternal.connect()


                  {
                     HornetQServerLogger.LOGGER.debug(BackupConnector.this + ":: announcing " + connector + " to " + backupServerLocator);
                  }
                  announcingBackup = true;
                  //connect to the cluster
                  ClientSessionFactory backupSessionFactory = localBackupLocator.connect();
                  //send the announce message
                  if (backupSessionFactory != null)
                  {
                     backupSessionFactory.getConnection()
                           .getChannel(0, -1)
View Full Code Here


               if (HornetQServerLogger.LOGGER.isDebugEnabled())
               {
                  HornetQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + ":: announcing " + connector + " to " + backupServerLocator);
               }
               announcingBackup = true;
               ClientSessionFactory backupSessionFactory = localBackupLocator.connect();
               if (backupSessionFactory != null)
               {
                  backupSessionFactory.getConnection()
                                      .getChannel(0, -1)
                                      .send(new NodeAnnounceMessage(System.currentTimeMillis(),
View Full Code Here

               if (HornetQServerLogger.LOGGER.isDebugEnabled())
               {
                  HornetQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + ":: announcing " + connector + " to " + backupServerLocator);
               }
               announcingBackup = true;
               ClientSessionFactory backupSessionFactory = localBackupLocator.connect();
               if (backupSessionFactory != null)
               {
                  backupSessionFactory.getConnection()
                                      .getChannel(0, -1)
                                      .send(new NodeAnnounceMessage(System.currentTimeMillis(),
View Full Code Here

   }

   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();
   }
View Full Code Here

            createTransportConfiguration(isNetty(), false, generateParams(1, isNetty())),
            createTransportConfiguration(isNetty(), false, generateParams(2, isNetty())),
            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();
   }
View Full Code Here

            createTransportConfiguration(isNetty(), false, generateParams(2, isNetty())),
            createTransportConfiguration(isNetty(), false, generateParams(3, isNetty())),
            createTransportConfiguration(isNetty(), false, generateParams(4, isNetty()))
      );
      locator.setReconnectAttempts(-1);
      ClientSessionFactoryInternal csf = (ClientSessionFactoryInternal) locator.connect();
      assertNotNull(csf);
      assertEquals(csf.numConnections(), 1);
      locator.close();
   }
View Full Code Here

            createTransportConfiguration(isNetty(), false, generateParams(5, isNetty()))
      );
      ClientSessionFactoryInternal csf = null;
      try
      {
         csf = (ClientSessionFactoryInternal) locator.connect();
      }
      catch (Exception e)
      {
         assertTrue(e instanceof HornetQException);
         assertEquals(((HornetQException)e).getCode(), HornetQException.NOT_CONNECTED);
View Full Code Here

               if (HornetQServerLogger.LOGGER.isDebugEnabled())
               {
                  HornetQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + ":: announcing " + connector + " to " + backupServerLocator);
               }
               announcingBackup = true;
               ClientSessionFactory backupSessionFactory = localBackupLocator.connect();
               if (backupSessionFactory != null)
               {
                  backupSessionFactory.getConnection()
                                      .getChannel(0, -1)
                                      .send(new NodeAnnounceMessage(System.currentTimeMillis(),
View Full Code Here

               configuration.getFailBackConnectors().toArray(new TransportConfiguration[1]);
            locator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithHA(tpArray);
            locator.setReconnectAttempts(0);
            try
            {
               factory = locator.connect();
            }
            catch (HornetQNotConnectedException notConnected)
            {
               return false;
            }
View Full Code Here

               if (HornetQLogger.LOGGER.isDebugEnabled())
               {
                  HornetQLogger.LOGGER.debug(ClusterConnectionImpl.this + ":: announcing " + connector + " to " + backupServerLocator);
               }
               announcingBackup = true;
               ClientSessionFactory backupSessionFactory = localBackupLocator.connect();
               if (backupSessionFactory != null)
               {
                  backupSessionFactory.getConnection()
                                      .getChannel(0, -1)
                                      .send(new NodeAnnounceMessage(System.currentTimeMillis(),
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.