@Override public boolean isStarted() { return ActiveMQServerImpl.this.isStarted(); } };
@Override public synchronized void start() throws Exception { Configuration config = server.getConfiguration(); try { storageManager = server.getStorageManager(); storageManager.start(); server.getManagementService().setStorageManager(storageManager); journalsHolder.put(JournalContent.BINDINGS, storageManager.getBindingsJournal()); journalsHolder.put(JournalContent.MESSAGES, storageManager.getMessageJournal()); for (JournalContent jc : EnumSet.allOf(JournalContent.class)) { filesReservedForSync.put(jc, new HashMap<Long, JournalSyncFile>()); // We only need to load internal structures on the backup... journalLoadInformation[jc.typeByte] = journalsHolder.get(jc).loadSyncOnly(JournalState.SYNCING); } pageManager = server.createPagingManager(); pageManager.start(); started = true; } catch (Exception e) { if (server.isStarted()) throw e; } }
private synchronized ReplicationEndpoint connectToReplicationEndpoint(final ClusterControl control) throws Exception { if (!activeMQServer.isStarted()) return null; if (!activeMQServer.getHAPolicy().isBackup()) { throw ActiveMQMessageBundle.BUNDLE.serverNotBackupServer(); } Channel replicationChannel = control.createReplicationChannel(); replicationChannel.setHandler(replicationEndpoint); if (replicationEndpoint.getChannel() != null) { throw ActiveMQMessageBundle.BUNDLE.alreadyHaveReplicationServer(); } replicationEndpoint.setChannel(replicationChannel); return replicationEndpoint; } }
if (!activeMQServer.isStarted() || signal == STOP) { if (logger.isTraceEnabled()) { logger.trace("giving up on the activation:: activemqServer.isStarted=" + activeMQServer.isStarted() + " while signal = " + signal); if (!activeMQServer.isStarted()) { logger.trace("Server is stopped, giving up right before becomingLive"); return; logger.trace(e.getMessage() + ", serverStarted=" + activeMQServer.isStarted(), e); if ((e instanceof InterruptedException || e instanceof IllegalStateException) && !activeMQServer.isStarted())
if (!activeMQServer.isStarted()) { throw new ActiveMQIllegalStateException();
} else { if (actualServer.isStarted()) { String threadDump = threadDump("can't get synchronization finished " + backup.isReplicaSync()); System.err.println(threadDump); fail("backup started? (" + actualServer.isStarted() + "). Finished synchronizing (" + (activation) + "). SessionFactory!=null ? " + (sessionFactory != null) + " || sessionFactory.getBackupConnector()==" +