public synchronized void start() throws Exception { if (started) { return; } for (BroadcastGroup group : broadcastGroups.values()) { if (!backup) { group.start(); } } for (ClusterConnection conn : clusterConnections.values()) { conn.start(); if (backup && configuration.isSharedStore()) { conn.informTopology(); conn.announceBackup(); } } for (BridgeConfiguration config : configuration.getBridgeConfigurations()) { deployBridge(config, !backup); } started = true; }
public synchronized void start() throws Exception { if (state == State.STARTED) { return; } for (BroadcastGroup group : broadcastGroups.values()) { if (!backup) { group.start(); } } for (ClusterConnection conn : clusterConnections.values()) { conn.start(); if (backup && configuration.isSharedStore()) { conn.informTopology(); conn.announceBackup(); } } deployConfiguredBridges(); state = State.STARTED; }
public void testGetAttributes() throws Exception { HornetQServerControl serverControl = createManagementControl(); Assert.assertEquals(server.getVersion().getFullVersion(), serverControl.getVersion()); Assert.assertEquals(conf.isClustered(), serverControl.isClustered()); Assert.assertEquals( conf.isPersistDeliveryCountBeforeDelivery(), serverControl.isPersistDeliveryCountBeforeDelivery()); Assert.assertEquals(conf.isBackup(), serverControl.isBackup()); Assert.assertEquals(conf.isSharedStore(), serverControl.isSharedStore()); Assert.assertEquals( conf.getScheduledThreadPoolMaxSize(), serverControl.getScheduledThreadPoolMaxSize()); Assert.assertEquals(conf.getThreadPoolMaxSize(), serverControl.getThreadPoolMaxSize()); Assert.assertEquals( conf.getSecurityInvalidationInterval(), serverControl.getSecurityInvalidationInterval()); Assert.assertEquals(conf.isSecurityEnabled(), serverControl.isSecurityEnabled()); Assert.assertEquals( conf.isAsyncConnectionExecutionEnabled(), serverControl.isAsyncConnectionExecutionEnabled()); Assert.assertEquals( conf.getInterceptorClassNames().size(), serverControl.getInterceptorClassNames().length); Assert.assertEquals(conf.getConnectionTTLOverride(), serverControl.getConnectionTTLOverride()); // Assert.assertEquals(conf.getBackupConnectorName(), serverControl.getBackupConnectorName()); Assert.assertEquals( conf.getManagementAddress().toString(), serverControl.getManagementAddress()); Assert.assertEquals( conf.getManagementNotificationAddress().toString(), serverControl.getManagementNotificationAddress()); Assert.assertEquals(conf.getIDCacheSize(), serverControl.getIDCacheSize()); Assert.assertEquals(conf.isPersistIDCache(), serverControl.isPersistIDCache()); Assert.assertEquals(conf.getBindingsDirectory(), serverControl.getBindingsDirectory()); Assert.assertEquals(conf.getJournalDirectory(), serverControl.getJournalDirectory()); Assert.assertEquals(conf.getJournalType().toString(), serverControl.getJournalType()); Assert.assertEquals( conf.isJournalSyncTransactional(), serverControl.isJournalSyncTransactional()); Assert.assertEquals( conf.isJournalSyncNonTransactional(), serverControl.isJournalSyncNonTransactional()); Assert.assertEquals(conf.getJournalFileSize(), serverControl.getJournalFileSize()); Assert.assertEquals(conf.getJournalMinFiles(), serverControl.getJournalMinFiles()); if (AsynchronousFileImpl.isLoaded()) { Assert.assertEquals(conf.getJournalMaxIO_AIO(), serverControl.getJournalMaxIO()); Assert.assertEquals(conf.getJournalBufferSize_AIO(), serverControl.getJournalBufferSize()); Assert.assertEquals( conf.getJournalBufferTimeout_AIO(), serverControl.getJournalBufferTimeout()); } Assert.assertEquals(conf.isCreateBindingsDir(), serverControl.isCreateBindingsDir()); Assert.assertEquals(conf.isCreateJournalDir(), serverControl.isCreateJournalDir()); Assert.assertEquals(conf.getPagingDirectory(), serverControl.getPagingDirectory()); Assert.assertEquals( conf.getLargeMessagesDirectory(), serverControl.getLargeMessagesDirectory()); Assert.assertEquals(conf.isWildcardRoutingEnabled(), serverControl.isWildcardRoutingEnabled()); Assert.assertEquals(conf.getTransactionTimeout(), serverControl.getTransactionTimeout()); Assert.assertEquals(conf.isMessageCounterEnabled(), serverControl.isMessageCounterEnabled()); Assert.assertEquals( conf.getTransactionTimeoutScanPeriod(), serverControl.getTransactionTimeoutScanPeriod()); Assert.assertEquals( conf.getMessageExpiryScanPeriod(), serverControl.getMessageExpiryScanPeriod()); Assert.assertEquals( conf.getMessageExpiryThreadPriority(), serverControl.getMessageExpiryThreadPriority()); Assert.assertEquals( conf.getJournalCompactMinFiles(), serverControl.getJournalCompactMinFiles()); Assert.assertEquals( conf.getJournalCompactPercentage(), serverControl.getJournalCompactPercentage()); Assert.assertEquals(conf.isPersistenceEnabled(), serverControl.isPersistenceEnabled()); Assert.assertEquals( conf.isFailoverOnServerShutdown(), serverControl.isFailoverOnServerShutdown()); }