ARTEMIS-992 deal w/bad connector-ref in cluster-cxn
This commit is contained in:
parent
a22712638f
commit
c7e0a92181
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue