Package org.hornetq.api.core.management

Examples of org.hornetq.api.core.management.DiscoveryGroupControl


   {
      ClientSessionFactory sf = HornetQClient.createClientSessionFactory(new TransportConfiguration(InVMConnectorFactory.class.getName()));
      session = sf.createSession(false, true, true);
      session.start();

      return new DiscoveryGroupControl()
      {
         private final CoreMessagingProxy proxy = new CoreMessagingProxy(session,
                                                                         ResourceNames.CORE_DISCOVERY_GROUP + name);

         public String getGroupAddress()
View Full Code Here


      conf.getDiscoveryGroupConfigurations().put(discoveryGroupConfig.getName(), discoveryGroupConfig);
      conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
      service = HornetQServers.newHornetQServer(conf, mbeanServer, false);
      service.start();

      DiscoveryGroupControl discoveryGroupControl = createManagementControl(discoveryGroupConfig.getName());

      Assert.assertEquals(discoveryGroupConfig.getName(), discoveryGroupControl.getName());
      Assert.assertEquals(discoveryGroupConfig.getGroupAddress(), discoveryGroupControl.getGroupAddress());
      Assert.assertEquals(discoveryGroupConfig.getGroupPort(), discoveryGroupControl.getGroupPort());
      Assert.assertEquals(discoveryGroupConfig.getRefreshTimeout(), discoveryGroupControl.getRefreshTimeout());
   }
View Full Code Here

      conf.getDiscoveryGroupConfigurations().put(discoveryGroupConfig.getName(), discoveryGroupConfig);
      conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
      service = HornetQServers.newHornetQServer(conf, mbeanServer, false);
      service.start();

      DiscoveryGroupControl discoveryGroupControl = createManagementControl(discoveryGroupConfig.getName());

      // started by the server
      Assert.assertTrue(discoveryGroupControl.isStarted());

      discoveryGroupControl.stop();
      Assert.assertFalse(discoveryGroupControl.isStarted());

      discoveryGroupControl.start();
      Assert.assertTrue(discoveryGroupControl.isStarted());
   }
View Full Code Here

   public synchronized void registerDiscoveryGroup(final DiscoveryGroup discoveryGroup,
                                                   final DiscoveryGroupConfiguration configuration) throws Exception
   {
      discoveryGroup.setNotificationService(this);
      ObjectName objectName = objectNameBuilder.getDiscoveryGroupObjectName(configuration.getName());
      DiscoveryGroupControl control = new DiscoveryGroupControlImpl(discoveryGroup, storageManager, configuration);
      registerInJMX(objectName, new StandardMBean(control, DiscoveryGroupControl.class));
      registerInRegistry(ResourceNames.CORE_DISCOVERY_GROUP + configuration.getName(), control);
   }
View Full Code Here

   public synchronized void registerDiscoveryGroup(final DiscoveryGroup discoveryGroup,
                                                   final DiscoveryGroupConfiguration configuration) throws Exception
   {
      discoveryGroup.setNotificationService(this);
      ObjectName objectName = objectNameBuilder.getDiscoveryGroupObjectName(configuration.getName());
      DiscoveryGroupControl control = new DiscoveryGroupControlImpl(discoveryGroup, storageManager, configuration);
      registerInJMX(objectName, new StandardMBean(control, DiscoveryGroupControl.class));
      registerInRegistry(ResourceNames.CORE_DISCOVERY_GROUP + configuration.getName(), control);
   }
View Full Code Here

   public synchronized void registerDiscoveryGroup(final DiscoveryGroup discoveryGroup,
                                                   final DiscoveryGroupConfiguration configuration) throws Exception
   {
      discoveryGroup.setNotificationService(this);
      ObjectName objectName = objectNameBuilder.getDiscoveryGroupObjectName(configuration.getName());
      DiscoveryGroupControl control = new DiscoveryGroupControlImpl(discoveryGroup, storageManager, configuration);
      registerInJMX(objectName, new StandardMBean(control, DiscoveryGroupControl.class));
      registerInRegistry(ResourceNames.CORE_DISCOVERY_GROUP + configuration.getName(), control);
   }
View Full Code Here

TOP

Related Classes of org.hornetq.api.core.management.DiscoveryGroupControl

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.