Package org.hornetq.core.config

Examples of org.hornetq.core.config.DiscoveryGroupConfiguration


      if (cf == null)
      {
         if (cfConfig.getDiscoveryGroupName() != null)
         {
            DiscoveryGroupConfiguration groupConfig = server.getConfiguration().getDiscoveryGroupConfigurations().get(cfConfig.getDiscoveryGroupName());
           
            if (groupConfig == null)
            {
               throw new HornetQException(HornetQException.ILLEGAL_STATE, "Discovery Group '" + cfConfig.getDiscoveryGroupName() + "' doesn't exist on maing config");
            }

            if (cfConfig.isHA())
            {
               cf = HornetQJMSClient.createConnectionFactoryWithHA(groupConfig.getGroupAddress(),
                                                                   groupConfig.getGroupPort(),
                                                                   cfConfig.getFactoryType());
            }
            else
            {
               cf = HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfig.getGroupAddress(),
                                                                      groupConfig.getGroupPort(),
                                                                      cfConfig.getFactoryType());
            }
            cf.setLocalBindAddress(groupConfig.getLocalBindAddress());
            cf.setDiscoveryRefreshTimeout(groupConfig.getRefreshTimeout());
            cf.setDiscoveryInitialWaitTimeout(groupConfig.getDiscoveryInitialWaitTimeout());
         }
         else
         {
            if (cfConfig.getConnectorNames() == null || cfConfig.getConnectorNames().size() == 0)
            {
View Full Code Here


   {
      if (cfConfig.getDiscoveryGroupName() != null)
      {
         Configuration configuration = server.getConfiguration();

         DiscoveryGroupConfiguration discoveryGroupConfiguration = null;
         discoveryGroupConfiguration = configuration.getDiscoveryGroupConfigurations()
                 .get(cfConfig.getDiscoveryGroupName());

         if (discoveryGroupConfiguration == null)
         {
            JMSServerManagerImpl.log.warn("There is no discovery group with name '" + cfConfig.getDiscoveryGroupName() +
                    "' deployed.");

            throw new HornetQException(HornetQException.ILLEGAL_STATE,
                    "There is no discovery group with name '" + cfConfig.getDiscoveryGroupName() +
                            "' deployed.");
         }

         cfConfig.setLocalBindAddress(discoveryGroupConfiguration.getLocalBindAddress());
         cfConfig.setDiscoveryAddress(discoveryGroupConfiguration.getGroupAddress());
         cfConfig.setDiscoveryPort(discoveryGroupConfiguration.getGroupPort());
         cfConfig.setDiscoveryRefreshTimeout(discoveryGroupConfiguration.getRefreshTimeout());

      }
   }
View Full Code Here

      Bridge bridge = null;

      if (config.getDiscoveryGroupName() != null)
      {
         DiscoveryGroupConfiguration discoveryGroupConfiguration = configuration.getDiscoveryGroupConfigurations()
                                                                                .get(config.getDiscoveryGroupName());
         if (discoveryGroupConfiguration == null)
         {
            ClusterManagerImpl.log.warn("No discovery group configured with name '" + config.getDiscoveryGroupName() +
                                        "'. The bridge will not be deployed.");

            return;
         }

         bridge = new BridgeImpl(nodeUUID,
                                 new SimpleString(config.getName()),
                                 queue,
                                 discoveryGroupConfiguration.getGroupAddress(),
                                 discoveryGroupConfiguration.getGroupPort(),
                                 null,
                                 executorFactory.getExecutor(),
                                 SimpleString.toSimpleString(config.getFilterString()),
                                 new SimpleString(config.getForwardingAddress()),
                                 scheduledExecutor,
View Full Code Here

      long refreshTimeout = XMLConfigurationUtil.getLong(e,
                                                         "refresh-timeout",
                                                         ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT,
                                                         Validators.GT_ZERO);

      DiscoveryGroupConfiguration config = new DiscoveryGroupConfiguration(name,
                                                                           localBindAddress,
                                                                           groupAddress,
                                                                           groupPort,
                                                                           refreshTimeout);
View Full Code Here

      long refreshTimeout = XMLConfigurationUtil.getLong(e,
                                                         "refresh-timeout",
                                                         ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT,
                                                         Validators.GT_ZERO);

      DiscoveryGroupConfiguration config = new DiscoveryGroupConfiguration(name,
                                                                           localBindAddress,
                                                                           groupAddress,
                                                                           groupPort,
                                                                           refreshTimeout);
View Full Code Here

   {
      if (cfConfig.getDiscoveryGroupName() != null)
      {
         Configuration configuration = server.getConfiguration();

         DiscoveryGroupConfiguration discoveryGroupConfiguration = null;
         discoveryGroupConfiguration = configuration.getDiscoveryGroupConfigurations()
                                                    .get(cfConfig.getDiscoveryGroupName());

         if (discoveryGroupConfiguration == null)
         {
            JMSServerManagerImpl.log.warn("There is no discovery group with name '" + cfConfig.getDiscoveryGroupName() +
                                          "' deployed.");

            throw new HornetQException(HornetQException.ILLEGAL_STATE,
                                       "There is no discovery group with name '" + cfConfig.getDiscoveryGroupName() +
                                                "' deployed.");
         }

         cfConfig.setLocalBindAddress(discoveryGroupConfiguration.getLocalBindAddress());
         cfConfig.setDiscoveryAddress(discoveryGroupConfiguration.getGroupAddress());
         cfConfig.setDiscoveryPort(discoveryGroupConfiguration.getGroupPort());
         cfConfig.setDiscoveryRefreshTimeout(discoveryGroupConfiguration.getRefreshTimeout());
       
      }
   }
View Full Code Here

      long refreshTimeout = XMLConfigurationUtil.getLong(e,
                                                         "refresh-timeout",
                                                         ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT,
                                                         Validators.GT_ZERO);

      DiscoveryGroupConfiguration config = new DiscoveryGroupConfiguration(name,
                                                                           localBindAddress,
                                                                           groupAddress,
                                                                           groupPort,
                                                                           refreshTimeout);
View Full Code Here

      Bridge bridge = null;

      if (config.getDiscoveryGroupName() != null)
      {
         DiscoveryGroupConfiguration discoveryGroupConfiguration = configuration.getDiscoveryGroupConfigurations()
                                                                                .get(config.getDiscoveryGroupName());
         if (discoveryGroupConfiguration == null)
         {
            ClusterManagerImpl.log.warn("No discovery group configured with name '" + config.getDiscoveryGroupName() +
                                        "'. The bridge will not be deployed.");

            return;
         }

         bridge = new BridgeImpl(nodeUUID,
                                 new SimpleString(config.getName()),
                                 queue,
                                 discoveryGroupConfiguration.getGroupAddress(),
                                 discoveryGroupConfiguration.getGroupPort(),
                                 null,
                                 executorFactory.getExecutor(),
                                 SimpleString.toSimpleString(config.getFilterString()),
                                 new SimpleString(config.getForwardingAddress()),
                                 scheduledExecutor,
View Full Code Here

      long refreshTimeout = XMLConfigurationUtil.getLong(e,
                                                         "refresh-timeout",
                                                         ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT,
                                                         Validators.GT_ZERO);

      DiscoveryGroupConfiguration config = new DiscoveryGroupConfiguration(name,
                                                                           localBindAddress,
                                                                           groupAddress,
                                                                           groupPort,
                                                                           refreshTimeout);
View Full Code Here

      Configuration conf = new ConfigurationImpl();
      conf.setSecurityEnabled(false);
      conf.setJMXManagementEnabled(true);
      conf.getDiscoveryGroupConfigurations()
          .put("discovery",
               new DiscoveryGroupConfiguration("discovery",
                                               null,
                                               "231.7.7.7",
                                               discoveryPort,
                                               ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT));
      HornetQServer server = HornetQServers.newHornetQServer(conf, mbeanServer, false);
View Full Code Here

TOP

Related Classes of org.hornetq.core.config.DiscoveryGroupConfiguration

Copyright © 2018 www.massapicom. 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.