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,