Package org.hornetq.core.config

Examples of org.hornetq.core.config.ClusterConnectionConfiguration


      backupConf.getAcceptorConfigurations().add(backupAcceptortc);
      backupConf.getConnectorConfigurations().put(livetc.getName(), livetc);
      backupConf.getConnectorConfigurations().put(backuptc.getName(), backuptc);
      ArrayList<String> staticConnectors = new ArrayList<String>();
      staticConnectors.add(livetc.getName());
      ClusterConnectionConfiguration cccBackup = new ClusterConnectionConfiguration("cluster1",
                                                                                    "jms",
                                                                                    backuptc.getName(),
                                                                                    -1,
                                                                                    false,
                                                                                    false,
                                                                                    1,
                                                                                    1,
                                                                                    staticConnectors,
                                                                                    false);

      backupConf.getClusterConfigurations().add(cccBackup);
      backupConf.setSecurityEnabled(false);
      backupConf.setJournalType(getDefaultJournalType());
      backupParams.put(TransportConstants.SERVER_ID_PROP_NAME, 1);
      backupConf.getAcceptorConfigurations()
                .add(new TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory", backupParams));
      backupConf.setBackup(true);
      backupConf.setSharedStore(true);
      backupConf.setBindingsDirectory(getBindingsDir());
      backupConf.setJournalMinFiles(2);
      backupConf.setJournalDirectory(getJournalDir());
      backupConf.setPagingDirectory(getPageDir());
      backupConf.setLargeMessagesDirectory(getLargeMessagesDir());
      backupConf.setPersistenceEnabled(true);
      backupConf.setClustered(true);
      backupService = new InVMNodeManagerServer(backupConf, nodeManager);

      backupJMSService = new JMSServerManagerImpl(backupService);

      backupJMSService.setContext(ctx2);

      backupJMSService.getHornetQServer().setIdentity("JMSBackup");
      log.info("Starting backup");
      backupJMSService.start();

      liveConf = createBasicConfig(0);

      liveConf.setJournalDirectory(getJournalDir());
      liveConf.setBindingsDirectory(getBindingsDir());

      liveConf.setSecurityEnabled(false);
      liveConf.getAcceptorConfigurations().add(liveAcceptortc);
      List<String> pairs = null;
      ClusterConnectionConfiguration ccc0 = new ClusterConnectionConfiguration("cluster1",
                                                                               "jms",
                                                                               livetc.getName(),
                                                                               -1,
                                                                               false,
                                                                               false,
View Full Code Here


      TransportConfiguration backupConnector = getConnectorTransportConfiguration(false);
      backupConfig.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
      backupConfig.getConnectorConfigurations().put(backupConnector.getName(), backupConnector);
      ArrayList<String> staticConnectors = new ArrayList<String>();
      staticConnectors.add(liveConnector.getName());
      ClusterConnectionConfiguration cccLive = new ClusterConnectionConfiguration("cluster1",
                                                                                  "jms",
                                                                                  backupConnector.getName(),
                                                                                  -1,
                                                                                  false,
                                                                                  false,
                                                                                  1,
                                                                                  1,
                                                                                  staticConnectors,
                                                                                  false);
      backupConfig.getClusterConfigurations().add(cccLive);
      backupServer = createBackupServer();

      HornetQSecurityManager securityManager = installSecurity(backupServer);

      securityManager.setDefaultUser(null);

      liveConfig = super.createDefaultConfig();
      liveConfig.getAcceptorConfigurations().clear();
      liveConfig.getAcceptorConfigurations().add(getAcceptorTransportConfiguration(true));
      liveConfig.setSecurityEnabled(true);
      liveConfig.setSharedStore(true);
      liveConfig.setClustered(true);
      List<String> pairs = null;
      ClusterConnectionConfiguration ccc0 = new ClusterConnectionConfiguration("cluster1",
                                                                               "jms",
                                                                               liveConnector.getName(),
                                                                               -1,
                                                                               false,
                                                                               false,
View Full Code Here

            ArrayList<String> list = new ArrayList<String>();
            list.add("netty");
            server.getConfiguration()
                  .getClusterConfigurations()
                  .add(new ClusterConnectionConfiguration("tst", "jms", "netty", 1000, true, false, 1, 1000, list, true));

         }

         server.start();
View Full Code Here

      CoreQueueConfiguration queueConfig = new CoreQueueConfiguration(RandomUtil.randomString(),
                                                              RandomUtil.randomString(),
                                                              null,
                                                              false);

      clusterConnectionConfig_0 = new ClusterConnectionConfiguration(clusterName,
                                                                     queueConfig.getAddress(),
                                                                     "netty",
                                                                     1000,
                                                                     false,
                                                                     false,
View Full Code Here

      TransportConfiguration backupConnector = getConnectorTransportConfiguration(false);
      backupConfig.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
      backupConfig.getConnectorConfigurations().put(backupConnector.getName(), backupConnector);
      ArrayList<String> staticConnectors = new ArrayList<String>();
      staticConnectors.add(liveConnector.getName());
      ClusterConnectionConfiguration cccLive = new ClusterConnectionConfiguration("cluster1", "jms", backupConnector.getName(), -1, false, false, 1, 1,
            staticConnectors, false);
      backupConfig.getClusterConfigurations().add(cccLive);
      backupServer = createBackupServer();
      backupServer.getServer().setIdentity("bkpIdentityServer");

      liveConfig = super.createDefaultConfig();
      liveConfig.getAcceptorConfigurations().clear();
      liveConfig.getAcceptorConfigurations().add(getAcceptorTransportConfiguration(true));
      liveConfig.setSecurityEnabled(false);
      liveConfig.setSharedStore(true);
      liveConfig.setClustered(true);
      List<String> pairs = null;
      ClusterConnectionConfiguration ccc0 = new ClusterConnectionConfiguration("cluster1", "jms", liveConnector.getName(), -1, false, false, 1, 1,
            pairs, false);
      liveConfig.getClusterConfigurations().add(ccc0);
      liveConfig.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
      liveServer = createLiveServer();
   }
View Full Code Here

      config1.getAcceptorConfigurations().add(acceptor2VM1);

      List<String> connectTo = new ArrayList<String>();
      connectTo.add("other-cc1");

      ClusterConnectionConfiguration server1CC1 = new ClusterConnectionConfiguration("cc1",
                                                                                     "jms",
                                                                                     "local-cc1",
                                                                                     250,
                                                                                     true,
                                                                                     false,
                                                                                     1,
                                                                                     1024,
                                                                                     connectTo,
                                                                                     false);

      config1.getClusterConfigurations().add(server1CC1);

      connectTo = new ArrayList<String>();
      connectTo.add("other-cc2");

      ClusterConnectionConfiguration server1CC2 = new ClusterConnectionConfiguration("cc2",
                                                                                     "jms",
                                                                                     "local-cc2",
                                                                                     250,
                                                                                     true,
                                                                                     false,
View Full Code Here

      config1.getAcceptorConfigurations().add(acceptor2VM1);

      List<String> connectTo = new ArrayList<String>();
      connectTo.add("other-cc1");

      ClusterConnectionConfiguration server1CC1 = new ClusterConnectionConfiguration("cc1",
                                                                                     "jms",
                                                                                     "local-cc1",
                                                                                     250,
                                                                                     true,
                                                                                     false,
                                                                                     1,
                                                                                     1024,
                                                                                     connectTo,
                                                                                     false);

      config1.getClusterConfigurations().add(server1CC1);

      connectTo = new ArrayList<String>();
      connectTo.add("other-cc2");

      ClusterConnectionConfiguration server1CC2 = new ClusterConnectionConfiguration("cc2",
                                                                                     "jms",
                                                                                     "local-cc2",
                                                                                     250,
                                                                                     true,
                                                                                     false,
View Full Code Here

      backupConf.getAcceptorConfigurations().add(backupAcceptortc);
      backupConf.getConnectorConfigurations().put(livetc.getName(), livetc);
      backupConf.getConnectorConfigurations().put(backuptc.getName(), backuptc);
      ArrayList<String> staticConnectors = new ArrayList<String>();
      staticConnectors.add(livetc.getName());
      ClusterConnectionConfiguration cccBackup = new ClusterConnectionConfiguration("cluster1",
                                                                                    "jms",
                                                                                    backuptc.getName(),
                                                                                    -1,
                                                                                    false,
                                                                                    false,
                                                                                    1,
                                                                                    1,
                                                                                    staticConnectors,
                                                                                    false);

      backupConf.getClusterConfigurations().add(cccBackup);
      backupConf.setSecurityEnabled(false);
      backupConf.setJournalType(getDefaultJournalType());
      backupParams.put(TransportConstants.SERVER_ID_PROP_NAME, 1);
      backupConf.getAcceptorConfigurations()
                .add(new TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory", backupParams));
      backupConf.setBackup(true);
      backupConf.setSharedStore(true);
      backupConf.setBindingsDirectory(getBindingsDir());
      backupConf.setJournalMinFiles(2);
      backupConf.setJournalDirectory(getJournalDir());
      backupConf.setPagingDirectory(getPageDir());
      backupConf.setLargeMessagesDirectory(getLargeMessagesDir());
      backupConf.setPersistenceEnabled(true);
      backupConf.setClustered(true);
      backupService = new InVMNodeManagerServer(backupConf, nodeManager);

      backupJMSService = new JMSServerManagerImpl(backupService);

      backupJMSService.setContext(ctx2);

      backupJMSService.start();

      liveConf = createBasicConfig(0);

      liveConf.setJournalDirectory(getJournalDir());
      liveConf.setBindingsDirectory(getBindingsDir());

      liveConf.setSecurityEnabled(false);
      liveConf.getAcceptorConfigurations().add(liveAcceptortc);
      List<String> pairs = null;
      ClusterConnectionConfiguration ccc0 = new ClusterConnectionConfiguration("cluster1",
                                                                               "jms",
                                                                               livetc.getName(),
                                                                               -1,
                                                                               false,
                                                                               false,
View Full Code Here

      CoreQueueConfiguration queueConfig = new CoreQueueConfiguration(RandomUtil.randomString(),
                                                              RandomUtil.randomString(),
                                                              null,
                                                              false);

      clusterConnectionConfig_0 = new ClusterConnectionConfiguration(clusterName,
                                                                     queueConfig.getAddress(),
                                                                     clusterName,
                                                                     1000,
                                                                     false,
                                                                     false,
View Full Code Here

         serverFrom.getConfiguration().getConnectorConfigurations().put(serverTotc.getName(), serverTotc);
         pairs = new ArrayList<String>();
         pairs.add(serverTotc.getName());
      }

      ClusterConnectionConfiguration clusterConf = new ClusterConnectionConfiguration(name,
                                                                                      address,
                                                                                      name,
                                                                                      100,
                                                                                      true,
                                                                                      forwardWhenNoConsumers,
View Full Code Here

TOP

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

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.