This commit is contained in:
Clebert Suconic 2017-02-23 16:52:31 -05:00
commit 872c35e2fa
3 changed files with 13 additions and 0 deletions

View File

@ -1404,6 +1404,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
String connectorName = getString(e, "connector-ref", null, Validators.NOT_NULL_OR_EMPTY);
if (!mainConfig.getConnectorConfigurations().containsKey(connectorName)) {
ActiveMQServerLogger.LOGGER.connectorRefNotFound(connectorName, name);
return;
}
boolean duplicateDetection = getBoolean(e, "use-duplicate-detection", ActiveMQDefaultConfiguration.isDefaultClusterDuplicateDetection());
MessageLoadBalancingType messageLoadBalancingType;

View File

@ -1287,6 +1287,10 @@ public interface ActiveMQServerLogger extends BasicLogger {
@Message(id = 222216, value = "Security problem while creating session: {0}", format = Message.Format.MESSAGE_FORMAT)
void securityProblemWhileCreatingSession(String message);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 222217, value = "Cannot find connector-ref {0}. The cluster-connection {1} will not be deployed.", format = Message.Format.MESSAGE_FORMAT)
void connectorRefNotFound(String connectorRef, String clusterConnection);
@LogMessage(level = Logger.Level.ERROR)
@Message(id = 224000, value = "Failure in initialisation", format = Message.Format.MESSAGE_FORMAT)

View File

@ -317,6 +317,10 @@ public class ClusterController implements ActiveMQComponent {
@Override
public void handlePacket(Packet packet) {
if (!isStarted()) {
return;
}
if (!authorized) {
if (packet.getType() == PacketImpl.CLUSTER_CONNECT) {
ClusterConnection clusterConnection = acceptorUsed.getClusterConnection();