http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationEndpoint.java ---------------------------------------------------------------------- diff --git a/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationEndpoint.java b/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationEndpoint.java index a65ac05..2914448 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationEndpoint.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationEndpoint.java @@ -50,7 +50,7 @@ import org.apache.activemq.core.protocol.core.ChannelHandler; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.protocol.core.impl.wireformat.BackupReplicationStartFailedMessage; -import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; +import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationAddMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationAddTXMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationCommitMessage; @@ -68,12 +68,12 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationStartSy import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationStartSyncMessage.SyncDataType; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationSyncFileMessage; import org.apache.activemq.core.replication.ReplicationManager.ADD_OPERATION_TYPE; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ServerMessage; import org.apache.activemq.core.server.cluster.qourum.SharedNothingBackupQuorum; -import org.apache.activemq.core.server.impl.HornetQServerImpl; +import org.apache.activemq.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.core.server.impl.SharedNothingBackupActivation; /** @@ -82,12 +82,12 @@ import org.apache.activemq.core.server.impl.SharedNothingBackupActivation; * * @author <mailto:clebert.suco...@jboss.org">Clebert Suconic</a> */ -public final class ReplicationEndpoint implements ChannelHandler, HornetQComponent +public final class ReplicationEndpoint implements ChannelHandler, ActiveMQComponent { - private static final boolean trace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private static final boolean trace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final IOCriticalErrorListener criticalErrorListener; - private final HornetQServerImpl server; + private final ActiveMQServerImpl server; private final boolean wantedFailBack; private final SharedNothingBackupActivation activation; private final boolean noSync = false; @@ -126,7 +126,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone private Executor executor; // Constructors -------------------------------------------------- - public ReplicationEndpoint(final HornetQServerImpl server, IOCriticalErrorListener criticalErrorListener, + public ReplicationEndpoint(final ActiveMQServerImpl server, IOCriticalErrorListener criticalErrorListener, boolean wantedFailBack, SharedNothingBackupActivation activation) { this.server = server; @@ -231,19 +231,19 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone } else { - HornetQServerLogger.LOGGER.invalidPacketForReplication(packet); + ActiveMQServerLogger.LOGGER.invalidPacketForReplication(packet); } } catch (ActiveMQException e) { - HornetQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet); - response = new HornetQExceptionMessage(e); + ActiveMQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet); + response = new ActiveMQExceptionMessage(e); } catch (Exception e) { - HornetQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet); + ActiveMQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet); response = - new HornetQExceptionMessage(HornetQMessageBundle.BUNDLE.replicationUnhandledError(e)); + new ActiveMQExceptionMessage(ActiveMQMessageBundle.BUNDLE.replicationUnhandledError(e)); } channel.send(response); } @@ -253,7 +253,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone */ private void handleFatalError(BackupReplicationStartFailedMessage packet) { - HornetQServerLogger.LOGGER.errorStartingReplication(packet.getRegistrationProblem()); + ActiveMQServerLogger.LOGGER.errorStartingReplication(packet.getRegistrationProblem()); server.stopTheServer(false); } @@ -359,7 +359,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone } catch (Exception e) { - HornetQServerLogger.LOGGER.errorClosingPageOnReplication(e); + ActiveMQServerLogger.LOGGER.errorClosingPageOnReplication(e); } } } @@ -399,20 +399,20 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone { if (!activation.isRemoteBackupUpToDate()) { - throw HornetQMessageBundle.BUNDLE.journalsNotInSync(); + throw ActiveMQMessageBundle.BUNDLE.journalsNotInSync(); } if (journalLoadInformation == null || journalLoadInformation.length != journalInformation.length) { - throw HornetQMessageBundle.BUNDLE.replicationTooManyJournals(); + throw ActiveMQMessageBundle.BUNDLE.replicationTooManyJournals(); } for (int i = 0; i < journalInformation.length; i++) { if (!journalInformation[i].equals(journalLoadInformation[i])) { - HornetQServerLogger.LOGGER.journalcomparisonMismatch(journalParametersToString(journalInformation)); - throw HornetQMessageBundle.BUNDLE.replicationTooManyJournals(); + ActiveMQServerLogger.LOGGER.journalcomparisonMismatch(journalParametersToString(journalInformation)); + throw ActiveMQMessageBundle.BUNDLE.replicationTooManyJournals(); } } @@ -485,7 +485,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone journalsHolder = null; backupQuorum.liveIDSet(liveID); activation.setRemoteBackupUpToDate(); - HornetQServerLogger.LOGGER.backupServerSynched(server); + ActiveMQServerLogger.LOGGER.backupServerSynched(server); return; } @@ -507,7 +507,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone ReplicatedLargeMessage largeMessage = lookupLargeMessage(id, false); if (!(largeMessage instanceof LargeServerMessageInSync)) { - HornetQServerLogger.LOGGER.largeMessageIncompatible(); + ActiveMQServerLogger.LOGGER.largeMessageIncompatible(); return; } LargeServerMessageInSync largeMessageInSync = (LargeServerMessageInSync) largeMessage; @@ -533,7 +533,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone return; } default: - throw HornetQMessageBundle.BUNDLE.replicationUnhandledFileType(msg.getFileType()); + throw ActiveMQMessageBundle.BUNDLE.replicationUnhandledFileType(msg.getFileType()); } if (data == null) @@ -560,7 +560,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone { if (activation.isRemoteBackupUpToDate()) { - throw HornetQMessageBundle.BUNDLE.replicationBackupUpToDate(); + throw ActiveMQMessageBundle.BUNDLE.replicationBackupUpToDate(); } @@ -587,7 +587,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone case JournalMessages: if (wantedFailBack && !packet.isServerToFailBack()) { - HornetQServerLogger.LOGGER.autoFailBackDenied(); + ActiveMQServerLogger.LOGGER.autoFailBackDenied(); } final JournalContent journalContent = SyncDataType.getJournalContentType(packet.getDataType()); @@ -609,7 +609,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone registerJournal(journalContent.typeByte, syncJournal); break; default: - throw HornetQMessageBundle.BUNDLE.replicationUnhandledDataType(); + throw ActiveMQMessageBundle.BUNDLE.replicationUnhandledDataType(); } } } @@ -630,7 +630,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone } catch (Exception e) { - HornetQServerLogger.LOGGER.errorDeletingLargeMessage(e, packet.getMessageId()); + ActiveMQServerLogger.LOGGER.errorDeletingLargeMessage(e, packet.getMessageId()); } } }); @@ -663,7 +663,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone if (message == null) { // No warnings if it's a delete, as duplicate deletes may be sent repeatedly. - HornetQServerLogger.LOGGER.largeMessageNotAvailable(messageId); + ActiveMQServerLogger.LOGGER.largeMessageNotAvailable(messageId); } } @@ -679,7 +679,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone { final long id = packet.getMessageId(); createLargeMessage(id, false); - HornetQServerLogger.LOGGER.trace("Receiving Large Message " + id + " on backup"); + ActiveMQServerLogger.LOGGER.trace("Receiving Large Message " + id + " on backup"); } private void createLargeMessage(final long id, boolean liveToBackupSync) @@ -777,7 +777,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone { if (ReplicationEndpoint.trace) { - HornetQServerLogger.LOGGER.trace("Endpoint appendUpdate id = " + packet.getId()); + ActiveMQServerLogger.LOGGER.trace("Endpoint appendUpdate id = " + packet.getId()); } journalToUse.appendUpdateRecord(packet.getId(), packet.getJournalRecordType(), packet.getRecordData(), noSync); } @@ -785,7 +785,7 @@ public final class ReplicationEndpoint implements ChannelHandler, HornetQCompone { if (ReplicationEndpoint.trace) { - HornetQServerLogger.LOGGER.trace("Endpoint append id = " + packet.getId()); + ActiveMQServerLogger.LOGGER.trace("Endpoint append id = " + packet.getId()); } journalToUse.appendAddRecord(packet.getId(), packet.getJournalRecordType(), packet.getRecordData(), noSync); }
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationManager.java ---------------------------------------------------------------------- diff --git a/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationManager.java b/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationManager.java index ced14b1..8dbe0c8 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationManager.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/replication/ReplicationManager.java @@ -56,8 +56,8 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationPageWri import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationPrepareMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationStartSyncMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationSyncFileMessage; -import org.apache.activemq.core.server.HornetQComponent; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQComponent; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.utils.ExecutorFactory; @@ -70,7 +70,7 @@ import org.apache.activemq.utils.ExecutorFactory; * @author <mailto:clebert.suco...@jboss.org">Clebert Suconic</a> * @see ReplicationEndpoint */ -public final class ReplicationManager implements HornetQComponent +public final class ReplicationManager implements ActiveMQComponent { public enum ADD_OPERATION_TYPE { @@ -323,7 +323,7 @@ public final class ReplicationManager implements HornetQComponent } catch (Throwable e) { - HornetQServerLogger.LOGGER.errorCompletingCallbackOnReplicationManager(e); + ActiveMQServerLogger.LOGGER.errorCompletingCallbackOnReplicationManager(e); } } } @@ -417,11 +417,11 @@ public final class ReplicationManager implements HornetQComponent if (me.getType() == ActiveMQExceptionType.DISCONNECTED) { // Backup has shut down - no need to log a stack trace - HornetQServerLogger.LOGGER.replicationStopOnBackupShutdown(); + ActiveMQServerLogger.LOGGER.replicationStopOnBackupShutdown(); } else { - HornetQServerLogger.LOGGER.replicationStopOnBackupFail(me); + ActiveMQServerLogger.LOGGER.replicationStopOnBackupFail(me); } try @@ -430,7 +430,7 @@ public final class ReplicationManager implements HornetQComponent } catch (Exception e) { - HornetQServerLogger.LOGGER.errorStoppingReplication(e); + ActiveMQServerLogger.LOGGER.errorStoppingReplication(e); } } @@ -490,7 +490,7 @@ public final class ReplicationManager implements HornetQComponent SequentialFile file = jf.getFile().cloneFile(); try { - HornetQServerLogger.LOGGER.journalSynch(jf, file.size(), file); + ActiveMQServerLogger.LOGGER.journalSynch(jf, file.size(), file); sendLargeFile(content, null, jf.getFileID(), file, Long.MAX_VALUE); } finally @@ -543,7 +543,7 @@ public final class ReplicationManager implements HornetQComponent { // We can afford having a single buffer here for this entire loop // because sendReplicatePacket will encode the packet as a NettyBuffer - // through HornetQBuffer class leaving this buffer free to be reused on the next copy + // through ActiveMQBuffer class leaving this buffer free to be reused on the next copy final ByteBuffer buffer = ByteBuffer.allocate(1 << 17); // 1 << 17 == 131072 == 128 * 1024 while (true) { @@ -646,10 +646,10 @@ public final class ReplicationManager implements HornetQComponent */ public OperationContext sendLiveIsStopping(final LiveStopping finalMessage) { - HornetQServerLogger.LOGGER.warn("LIVE IS STOPPING?!? message=" + finalMessage + " enabled=" + enabled); + ActiveMQServerLogger.LOGGER.warn("LIVE IS STOPPING?!? message=" + finalMessage + " enabled=" + enabled); if (enabled) { - HornetQServerLogger.LOGGER.warn("LIVE IS STOPPING?!? message=" + finalMessage + " " + enabled); + ActiveMQServerLogger.LOGGER.warn("LIVE IS STOPPING?!? message=" + finalMessage + " " + enabled); return sendReplicatePacket(new ReplicationLiveIsStoppingMessage(finalMessage)); } return null; http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-server/src/main/java/org/apache/activemq/core/security/impl/SecurityStoreImpl.java ---------------------------------------------------------------------- diff --git a/activemq-server/src/main/java/org/apache/activemq/core/security/impl/SecurityStoreImpl.java b/activemq-server/src/main/java/org/apache/activemq/core/security/impl/SecurityStoreImpl.java index 2fbc96f..cfe144a 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/security/impl/SecurityStoreImpl.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/security/impl/SecurityStoreImpl.java @@ -22,19 +22,19 @@ import org.apache.activemq.api.core.management.ManagementHelper; import org.apache.activemq.core.security.CheckType; import org.apache.activemq.core.security.Role; import org.apache.activemq.core.security.SecurityStore; -import org.apache.activemq.core.server.HornetQMessageBundle; -import org.apache.activemq.core.server.HornetQServerLogger; +import org.apache.activemq.core.server.ActiveMQMessageBundle; +import org.apache.activemq.core.server.ActiveMQServerLogger; import org.apache.activemq.core.server.ServerSession; import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.core.server.management.NotificationService; import org.apache.activemq.core.settings.HierarchicalRepository; import org.apache.activemq.core.settings.HierarchicalRepositoryChangeListener; -import org.apache.activemq.spi.core.security.HornetQSecurityManager; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.utils.ConcurrentHashSet; import org.apache.activemq.utils.TypedProperties; /** - * The HornetQ SecurityStore implementation + * The ActiveMQ SecurityStore implementation * * @author <a href="mailto:tim....@jboss.com">Tim Fox</a> * @author <a href="atay...@redhat.com">Andy Taylor</a> @@ -51,11 +51,11 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC // Attributes ---------------------------------------------------- - private final boolean trace = HornetQServerLogger.LOGGER.isTraceEnabled(); + private final boolean trace = ActiveMQServerLogger.LOGGER.isTraceEnabled(); private final HierarchicalRepository<Set<Role>> securityRepository; - private final HornetQSecurityManager securityManager; + private final ActiveMQSecurityManager securityManager; private final ConcurrentMap<String, ConcurrentHashSet<SimpleString>> cache = new ConcurrentHashMap<String, ConcurrentHashSet<SimpleString>>(); @@ -77,7 +77,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC * @param notificationService can be <code>null</code> */ public SecurityStoreImpl(final HierarchicalRepository<Set<Role>> securityRepository, - final HornetQSecurityManager securityManager, + final ActiveMQSecurityManager securityManager, final long invalidationInterval, final boolean securityEnabled, final String managementClusterUser, @@ -116,7 +116,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC { if (trace) { - HornetQServerLogger.LOGGER.trace("Authenticating cluster admin user"); + ActiveMQServerLogger.LOGGER.trace("Authenticating cluster admin user"); } /* @@ -125,7 +125,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC */ if (!managementClusterPassword.equals(password)) { - throw HornetQMessageBundle.BUNDLE.unableToValidateClusterUser(user); + throw ActiveMQMessageBundle.BUNDLE.unableToValidateClusterUser(user); } else { @@ -146,7 +146,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC notificationService.sendNotification(notification); } - throw HornetQMessageBundle.BUNDLE.unableToValidateUser(user); + throw ActiveMQMessageBundle.BUNDLE.unableToValidateUser(user); } } } @@ -157,7 +157,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC { if (trace) { - HornetQServerLogger.LOGGER.trace("checking access permissions to " + address); + ActiveMQServerLogger.LOGGER.trace("checking access permissions to " + address); } String user = session.getUsername(); @@ -192,7 +192,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC notificationService.sendNotification(notification); } - throw HornetQMessageBundle.BUNDLE.userNoPermissions(session.getUsername(), checkType, saddress); + throw ActiveMQMessageBundle.BUNDLE.userNoPermissions(session.getUsername(), checkType, saddress); } // if we get here we're granted, add to the cache ConcurrentHashSet<SimpleString> set = new ConcurrentHashSet<SimpleString>(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQMessageBundle.java ---------------------------------------------------------------------- diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQMessageBundle.java b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQMessageBundle.java new file mode 100644 index 0000000..14270a7 --- /dev/null +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQMessageBundle.java @@ -0,0 +1,371 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat licenses this file to you under the Apache License, version + * 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package org.apache.activemq.core.server; + +import org.apache.activemq.api.core.ActiveMQAddressFullException; +import org.apache.activemq.api.core.ActiveMQClusterSecurityException; +import org.apache.activemq.api.core.ActiveMQConnectionTimedOutException; +import org.apache.activemq.api.core.ActiveMQDisconnectedException; +import org.apache.activemq.api.core.ActiveMQDuplicateMetaDataException; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQIOErrorException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQIncompatibleClientServerException; +import org.apache.activemq.api.core.ActiveMQInternalErrorException; +import org.apache.activemq.api.core.ActiveMQInvalidFilterExpressionException; +import org.apache.activemq.api.core.ActiveMQInvalidTransientQueueUseException; +import org.apache.activemq.api.core.ActiveMQNonExistentQueueException; +import org.apache.activemq.api.core.ActiveMQQueueExistsException; +import org.apache.activemq.api.core.ActiveMQSecurityException; +import org.apache.activemq.api.core.ActiveMQSessionCreationException; +import org.apache.activemq.api.core.DiscoveryGroupConfiguration; +import org.apache.activemq.api.core.SimpleString; +import org.apache.activemq.core.postoffice.Binding; +import org.apache.activemq.core.protocol.core.impl.wireformat.ReplicationSyncFileMessage; +import org.apache.activemq.core.security.CheckType; +import org.jboss.logging.annotations.Cause; +import org.jboss.logging.annotations.Message; +import org.jboss.logging.annotations.MessageBundle; +import org.jboss.logging.Messages; + +import java.io.File; + +/** + * Logger Code 11 + * <p/> + * Each message id must be 6 digits long starting with 10, the 3rd digit should be 9. So the range + * is from 119000 to 119999. + * <p/> + * Once released, methods should not be deleted as they may be referenced by knowledge base + * articles. Unused methods should be marked as deprecated. + * + * @author <a href="mailto:andy.tay...@jboss.org">Andy Taylor</a> + */ +@MessageBundle(projectCode = "AMQ") +public interface ActiveMQMessageBundle +{ + ActiveMQMessageBundle BUNDLE = Messages.getBundle(ActiveMQMessageBundle.class); + + @Message(id = 119000, value = "Activation for server {0}", format = Message.Format.MESSAGE_FORMAT) + String activationForServer(ActiveMQServer server); + + @Message(id = 119001, value = "Generating thread dump because - {0}", format = Message.Format.MESSAGE_FORMAT) + String generatingThreadDump(String reason); + + @Message(id = 119002, value = "Thread {0} name = {1} id = {2} group = {3}", format = Message.Format.MESSAGE_FORMAT) + String threadDump(Thread key, String name, Long id, ThreadGroup threadGroup); + + @Message(id = 119003, value = "End Thread dump", format = Message.Format.MESSAGE_FORMAT) + String endThreadDump(); + + @Message(id = 119004, value = "Information about server {0}\nCluster Connection:{1}", format = Message.Format.MESSAGE_FORMAT) + String serverDescribe(String identity, String describe); + + @Message(id = 119005, value = "connections for {0} closed by management", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException connectionsClosedByManagement(String ipAddress); + + @Message(id = 119006, value = "journals are not JournalImpl. You can''t set a replicator!", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException notJournalImpl(); + + @Message(id = 119007, value = "unhandled error during replication", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException replicationUnhandledError(@Cause Exception e); + + @Message(id = 119008, value = "Live Node contains more journals than the backup node. Probably a version match error", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException replicationTooManyJournals(); + + @Message(id = 119009, value = "Unhandled file type {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException replicationUnhandledFileType(ReplicationSyncFileMessage.FileType fileType); + + @Message(id = 119010, value = "Remote Backup can not be up-to-date!", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException replicationBackupUpToDate(); + + @Message(id = 119011, value = "unhandled data type!", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException replicationUnhandledDataType(); + + @Message(id = 119012, value = "No binding for divert {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException noBindingForDivert(SimpleString name); + + @Message(id = 119013, value = "Binding {0} is not a divert", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException bindingNotDivert(SimpleString name); + + @Message(id = 119014, + value = "Did not receive data from {0}. It is likely the client has exited or crashed without " + + + "closing its connection, or the network between the server and client has failed. " + + "You also might have configured connection-ttl and client-failure-check-period incorrectly. " + + "Please check user manual for more information." + + " The connection will now be closed.", format = Message.Format.MESSAGE_FORMAT) + ActiveMQConnectionTimedOutException clientExited(String remoteAddress); + + @Message(id = 119015, value = "Timeout on waiting I/O completion", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIOErrorException ioTimeout(); + + @Message(id = 119016, value = "queue {0} has been removed cannot deliver message, queues should not be removed when grouping is used", format = Message.Format.MESSAGE_FORMAT) + ActiveMQNonExistentQueueException groupingQueueRemoved(SimpleString chosenClusterName); + + @Message(id = 119017, value = "Queue {0} does not exist", format = Message.Format.MESSAGE_FORMAT) + ActiveMQNonExistentQueueException noSuchQueue(SimpleString queueName); + + @Message(id = 119018, value = "Binding already exists {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQQueueExistsException bindingAlreadyExists(Binding binding); + + @Message(id = 119019, value = "Queue already exists {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQQueueExistsException queueAlreadyExists(SimpleString queueName); + + @Message(id = 119020, value = "Invalid filter: {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInvalidFilterExpressionException invalidFilter(@Cause Throwable e, SimpleString filter); + + @Message(id = 119021, value = "MessageId was not assigned to Message", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException messageIdNotAssigned(); + + @Message(id = 119022, value = "Cannot compare journals if not in sync!", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException journalsNotInSync(); + + @Message(id = 119023, value = "Connected server is not a backup server", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException serverNotBackupServer(); + + @Message(id = 119024, value = "Backup replication server is already connected to another server", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException alreadyHaveReplicationServer(); + + @Message(id = 119025, value = "Cannot delete queue {0} on binding {1} - it has consumers = {2}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException cannotDeleteQueue(SimpleString name, SimpleString queueName, String s); + + @Message(id = 119026, value = "Backup Server was not yet in sync with live", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException backupServerNotInSync(); + + @Message(id = 119027, value = "Could not find reference on consumer ID={0}, messageId = {1} queue = {2}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException consumerNoReference(Long id, Long messageID, SimpleString name); + + @Message(id = 119028, value = "Consumer {0} doesn''t exist on the server", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException consumerDoesntExist(long consumerID); + + @Message(id = 119029, value = "No address configured on the Server''s Session", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException noAddress(); + + @Message(id = 119030, value = "large-message not initialized on server", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException largeMessageNotInitialised(); + + @Message(id = 119031, value = "Unable to validate user: {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQSecurityException unableToValidateUser(String user); + + @Message(id = 119032, value = "User: {0} does not have permission=''{1}'' on address {2}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQSecurityException userNoPermissions(String username, CheckType checkType, String saddress); + + @Message(id = 119033, value = "Server and client versions incompatible", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIncompatibleClientServerException incompatibleClientServer(); + + @Message(id = 119034, value = "Server not started", format = Message.Format.MESSAGE_FORMAT) + ActiveMQSessionCreationException serverNotStarted(); + + @Message(id = 119035, value = "Metadata {0}={1} had been set already", format = Message.Format.MESSAGE_FORMAT) + ActiveMQDuplicateMetaDataException duplicateMetadata(String key, String data); + + @Message(id = 119036, value = "Invalid type: {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidType(Object type); + + @Message(id = 119037, value = "retry interval must be positive, was {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidRetryInterval(Long size); + + @Message(id = 119038, value = "{0} must neither be null nor empty", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException emptyOrNull(String name); + + @Message(id = 119039, value = "{0} must be greater than 0 (actual value: {1})", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException greaterThanZero(String name, Number val); + + @Message(id = 119040, value = "{0} must be a valid percentual value between 0 and 100 (actual value: {1})", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException notPercent(String name, Number val); + + @Message(id = 119041, value = "{0} must be equals to -1 or greater than 0 (actual value: {1})", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException greaterThanMinusOne(String name, Number val); + + @Message(id = 119042, value = "{0} must be equals to -1 or greater or equals to 0 (actual value: {1})", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException greaterThanZeroOrMinusOne(String name, Number val); + + @Message(id = 119043, value = "{0} must be between {1} and {2} inclusive (actual value: {3})", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException mustbeBetween(String name, Integer minPriority, Integer maxPriority, Object value); + + @Message(id = 119044, value = "Invalid journal type {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidJournalType(String val); + + @Message(id = 119045, value = "Invalid address full message policy type {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidAddressFullPolicyType(String val); + + @Message(id = 119046, value = "invalid value: {0} count must be greater than 0", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException greaterThanZero(Integer count); + + @Message(id = 119047, value = "Cannot set Message Counter Sample Period < {0}ms", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidMessageCounterPeriod(Long period); + + @Message(id = 119048, value = "invalid new Priority value: {0}. It must be between 0 and 9 (both included)", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidNewPriority(Integer period); + + @Message(id = 119049, value = "No queue found for {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException noQueueFound(String otherQueueName); + + @Message(id = 119050, value = "Only NIO and AsyncIO are supported journals", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidJournal(); + + @Message(id = 119051, value = "Invalid journal type {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidJournalType2(JournalType journalType); + + @Message(id = 119052, value = "Directory {0} does not exist and cannot be created", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException cannotCreateDir(String dir); + + @Message(id = 119053, value = "Invalid index {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidIndex(Integer index); + + @Message(id = 119054, value = "Cannot convert to int", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException cannotConvertToInt(); + + @Message(id = 119055, value = "Routing name is null", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException routeNameIsNull(); + + @Message(id = 119056, value = "Cluster name is null", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException clusterNameIsNull(); + + @Message(id = 119057, value = "Address is null", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException addressIsNull(); + + @Message(id = 119058, value = "Binding type not specified", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException bindingTypeNotSpecified(); + + @Message(id = 119059, value = "Binding ID is null", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException bindingIdNotSpecified(); + + @Message(id = 119060, value = "Distance is null", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException distancenotSpecified(); + + @Message(id = 119061, value = "Connection already exists with id {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException connectionExists(Object id); + + @Message(id = 119062, value = "Acceptor with id {0} already registered", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException acceptorExists(Integer id); + + @Message(id = 119063, value = "Acceptor with id {0} not registered", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException acceptorNotExists(Integer id); + + @Message(id = 119064, value = "Unknown protocol {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException unknownProtocol(String protocol); + + @Message(id = 119065, value = "node id is null", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException nodeIdNull(); + + @Message(id = 119066, value = "Queue name is null", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException queueNameIsNull(); + + @Message(id = 119067, value = "Cannot find resource with name {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException cannotFindResource(String resourceName); + + @Message(id = 119068, value = "no getter method for {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException noGetterMethod(String resourceName); + + @Message(id = 119069, value = "no operation {0}/{1}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException noOperation(String operation, Integer length); + + @Message(id = 119070, value = "match can not be null", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException nullMatch(); + + @Message(id = 119071, value = "# can only be at end of match", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidMatch(); + + @Message(id = 119072, value = "User cannot be null", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException nullUser(); + + @Message(id = 119073, value = "Password cannot be null", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException nullPassword(); + + @Message(id = 119074, value = "Error instantiating transformer class {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException errorCreatingTransformerClass(@Cause Exception e, String transformerClassName); + + @Message(id = 119075, value = "method autoEncode doesn''t know how to convert {0} yet", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException autoConvertError(Class<? extends Object> aClass); + + /** + * Message used on on {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl#destroyConnectionWithSessionMetadata(String, String)} + */ + @Message(id = 119076, value = "Executing destroyConnection with {0}={1} through management''s request", format = Message.Format.MESSAGE_FORMAT) + String destroyConnectionWithSessionMetadataHeader(String key, String value); + + /** + * Message used on on {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl#destroyConnectionWithSessionMetadata(String, String)} + */ + @Message(id = 119077, value = "Closing connection {0}", format = Message.Format.MESSAGE_FORMAT) + String destroyConnectionWithSessionMetadataClosingConnection(String serverSessionString); + + /** + * Exception used on on {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl#destroyConnectionWithSessionMetadata(String, String)} + */ + @Message(id = 119078, value = "Disconnected per admin''s request on {0}={1}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQDisconnectedException destroyConnectionWithSessionMetadataSendException(String key, String value); + + /** + * Message used on on {@link org.apache.activemq.core.server.impl.ActiveMQServerImpl#destroyConnectionWithSessionMetadata(String, String)} + */ + @Message(id = 119079, value = "No session found with {0}={1}", format = Message.Format.MESSAGE_FORMAT) + String destroyConnectionWithSessionMetadataNoSessionFound(String key, String value); + + @Message(id = 119080, value = "Invalid Page IO, PagingManager was stopped or closed", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException invalidPageIO(); + + @Message(id = 119081, value = "No Discovery Group configuration named {0} found", format = Message.Format.MESSAGE_FORMAT) + ActiveMQException noDiscoveryGroupFound(DiscoveryGroupConfiguration dg); + + @Message(id = 119082, value = "Queue {0} already exists on another subscription", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInvalidTransientQueueUseException queueSubscriptionBelongsToDifferentAddress(SimpleString queueName); + + @Message(id = 119083, value = "Queue {0} has a different filter than requested", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInvalidTransientQueueUseException queueSubscriptionBelongsToDifferentFilter(SimpleString queueName); + + @Message(id = 119085, value = "Classpath lacks a protocol-manager for protocol {0}", + format = Message.Format.MESSAGE_FORMAT) + ActiveMQException noProtocolManagerFound(String protocol); + + // this code has to match with version 2.3.x as it's used on integration tests at Wildfly and JBoss EAP + @Message(id = 119099, value = "Unable to authenticate cluster user: {0}", + format = Message.Format.MESSAGE_FORMAT) + ActiveMQClusterSecurityException unableToValidateClusterUser(String user); + + + @Message(id = 119100, value = "Trying to move a journal file that refers to a file instead of a directory: {0}", + format = Message.Format.MESSAGE_FORMAT) + IllegalStateException journalDirIsFile(File fDir); + + @Message(id = 119101, value = "error trying to backup journal files at directory: {0}", + format = Message.Format.MESSAGE_FORMAT) + IllegalStateException couldNotMoveJournal(File dir); + + @Message(id = 119102, value = "Address \"{0}\" is full.", format = Message.Format.MESSAGE_FORMAT) + ActiveMQAddressFullException addressIsFull(String addressName); + + @Message(id = 119103, value = "No Connectors or Discovery Groups configured for Scale Down", format = Message.Format.MESSAGE_FORMAT) + ActiveMQException noConfigurationFoundForScaleDown(); + + @Message(id = 119104, value = "Server is stopping. Message grouping not allowed", format = Message.Format.MESSAGE_FORMAT) + ActiveMQException groupWhileStopping(); + + @Message(id = 119105, value = "Server will not accept create session request since scale down has not occurred", format = Message.Format.MESSAGE_FORMAT) + ActiveMQSessionCreationException sessionNotFailedOver(); + + @Message(id = 119106, value = "Invalid slow consumer policy type {0}", format = Message.Format.MESSAGE_FORMAT) + IllegalArgumentException invalidSlowConsumerPolicyType(String val); + + @Message(id = 119107, value = "consumer connections for address {0} closed by management", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException consumerConnectionsClosedByManagement(String address); + + @Message(id = 119108, value = "connections for user {0} closed by management", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException connectionsForUserClosedByManagement(String userName); + + @Message(id = 119109, value = "unsupported HA Policy Configuration {0}", format = Message.Format.MESSAGE_FORMAT) + ActiveMQIllegalStateException unsupportedHAPolicyConfiguration(Object o); +} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServer.java ---------------------------------------------------------------------- diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServer.java b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServer.java new file mode 100644 index 0000000..438203e --- /dev/null +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServer.java @@ -0,0 +1,249 @@ +/* + * Copyright 2005-2014 Red Hat, Inc. + * Red Hat licenses this file to you under the Apache License, version + * 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.apache.activemq.core.server; + +import java.util.List; +import java.util.Set; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import org.apache.activemq.api.core.SimpleString; +import org.apache.activemq.core.config.BridgeConfiguration; +import org.apache.activemq.core.config.Configuration; +import org.apache.activemq.core.config.DivertConfiguration; +import org.apache.activemq.core.management.impl.ActiveMQServerControlImpl; +import org.apache.activemq.core.paging.PagingManager; +import org.apache.activemq.core.persistence.StorageManager; +import org.apache.activemq.core.postoffice.PostOffice; +import org.apache.activemq.core.remoting.server.RemotingService; +import org.apache.activemq.core.replication.ReplicationManager; +import org.apache.activemq.core.security.Role; +import org.apache.activemq.core.security.SecurityStore; +import org.apache.activemq.core.server.cluster.ClusterManager; +import org.apache.activemq.core.server.cluster.ha.HAPolicy; +import org.apache.activemq.core.server.group.GroupingHandler; +import org.apache.activemq.core.server.impl.Activation; +import org.apache.activemq.core.server.impl.ConnectorsService; +import org.apache.activemq.core.server.management.ManagementService; +import org.apache.activemq.core.settings.HierarchicalRepository; +import org.apache.activemq.core.settings.impl.AddressSettings; +import org.apache.activemq.core.transaction.ResourceManager; +import org.apache.activemq.core.version.Version; +import org.apache.activemq.spi.core.protocol.ProtocolManagerFactory; +import org.apache.activemq.spi.core.protocol.RemotingConnection; +import org.apache.activemq.spi.core.protocol.SessionCallback; +import org.apache.activemq.spi.core.security.ActiveMQSecurityManager; +import org.apache.activemq.utils.ExecutorFactory; + +/** + * This interface defines the internal interface of the ActiveMQ Server exposed to other components + * of the server. + * <p> + * This is not part of our public API. + * @author <a href="tim....@jboss.com">Tim Fox</a> + * @author <a href="atay...@redhat.com">Andy Taylor</a> + */ +public interface ActiveMQServer extends ActiveMQComponent +{ + + /** + * Sets the server identity. + * <p> + * The identity will be exposed on logs. It may help to debug issues on the log traces and + * debugs. + * <p> + * This method was created mainly for testing but it may be used in scenarios where you need to + * have more than one Server inside the same VM. + */ + void setIdentity(String identity); + + String getIdentity(); + + String describe(); + + void addActivationParam(String key, Object val); + + Configuration getConfiguration(); + + RemotingService getRemotingService(); + + StorageManager getStorageManager(); + + PagingManager getPagingManager(); + + ManagementService getManagementService(); + + ActiveMQSecurityManager getSecurityManager(); + + Version getVersion(); + + NodeManager getNodeManager(); + + /** + * Returns the resource to manage this ActiveMQ server. + * @throws IllegalStateException if the server is not properly started. + */ + ActiveMQServerControlImpl getActiveMQServerControl(); + + void registerActivateCallback(ActivateCallback callback); + + void unregisterActivateCallback(ActivateCallback callback); + + ServerSession createSession(String name, + String username, + String password, + int minLargeMessageSize, + RemotingConnection remotingConnection, + boolean autoCommitSends, + boolean autoCommitAcks, + boolean preAcknowledge, + boolean xa, + String defaultAddress, + SessionCallback callback, + ServerSessionFactory sessionFactory) throws Exception; + + SecurityStore getSecurityStore(); + + void removeSession(String name) throws Exception; + + Set<ServerSession> getSessions(); + + HierarchicalRepository<Set<Role>> getSecurityRepository(); + + HierarchicalRepository<AddressSettings> getAddressSettingsRepository(); + + int getConnectionCount(); + + PostOffice getPostOffice(); + + QueueFactory getQueueFactory(); + + ResourceManager getResourceManager(); + + List<ServerSession> getSessions(String connectionID); + + /** @return a session containing the meta-key and meata-value */ + ServerSession lookupSession(String metakey, String metavalue); + + ClusterManager getClusterManager(); + + SimpleString getNodeID(); + + boolean isActive(); + + /** + * Wait for server initialization. + * @param timeout + * @param unit + * @see CountDownLatch#await(long, TimeUnit) + * @return {@code true} if the server was already initialized or if it was initialized within the + * timeout period, {@code false} otherwise. + * @throws InterruptedException + */ + boolean waitForActivation(long timeout, TimeUnit unit) throws InterruptedException; + + /** + * Creates a shared queue. if non durable it will exist as long as there are consumers. + * + * Notice: the queue won't be deleted until the first consumer arrives. + * + * @param address + * @param name + * @param filterString + * @param durable + * @throws Exception + */ + void createSharedQueue(final SimpleString address, + final SimpleString name, + final SimpleString filterString, + boolean durable) throws Exception; + + Queue createQueue(SimpleString address, + SimpleString queueName, + SimpleString filter, + boolean durable, + boolean temporary) throws Exception; + + Queue deployQueue(SimpleString address, + SimpleString queueName, + SimpleString filterString, + boolean durable, + boolean temporary) throws Exception; + + Queue locateQueue(SimpleString queueName) throws Exception; + + void destroyQueue(SimpleString queueName) throws Exception; + + void destroyQueue(SimpleString queueName, ServerSession session) throws Exception; + + void destroyQueue(SimpleString queueName, ServerSession session, boolean checkConsumerCount) throws Exception; + + void destroyQueue(SimpleString queueName, ServerSession session, boolean checkConsumerCount, boolean removeConsumers) throws Exception; + + String destroyConnectionWithSessionMetadata(String metaKey, String metaValue) throws Exception; + + ScheduledExecutorService getScheduledPool(); + + ExecutorFactory getExecutorFactory(); + + void setGroupingHandler(GroupingHandler groupingHandler); + + GroupingHandler getGroupingHandler(); + + ReplicationManager getReplicationManager(); + + void deployDivert(DivertConfiguration config) throws Exception; + + void destroyDivert(SimpleString name) throws Exception; + + ConnectorsService getConnectorsService(); + + void deployBridge(BridgeConfiguration config) throws Exception; + + void destroyBridge(String name) throws Exception; + + ServerSession getSessionByID(String sessionID); + + void threadDump(String reason); + + /** + * return true if there is a binding for this address (i.e. if there is a created queue) + * @param address + * @return + */ + boolean isAddressBound(String address) throws Exception; + + void stop(boolean failoverOnServerShutdown) throws Exception; + + /* + * add a ProtocolManagerFactory to be used. Note if @see Configuration#isResolveProtocols is tur then this factory will + * replace any factories with the same protocol + * */ + void addProtocolManagerFactory(ProtocolManagerFactory factory); + + /* + * add a ProtocolManagerFactory to be used. + * */ + void removeProtocolManagerFactory(ProtocolManagerFactory factory); + + ActiveMQServer createBackupServer(Configuration configuration); + + void addScaledDownNode(SimpleString scaledDownNodeId); + + boolean hasScaledDown(SimpleString scaledDownNodeId); + + Activation getActivation(); + + HAPolicy getHAPolicy(); + + void setHAPolicy(HAPolicy haPolicy); +}