ARTEMIS-992 deal w/bad connector-ref in cluster-cxn
(cherry picked from commit c7e0a92181
)
This commit is contained in:
parent
1f054f04a0
commit
2b18db6a1c
|
@ -1268,6 +1268,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
|
||||||
|
|
||||||
String connectorName = getString(e, "connector-ref", null, Validators.NOT_NULL_OR_EMPTY);
|
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());
|
boolean duplicateDetection = getBoolean(e, "use-duplicate-detection", ActiveMQDefaultConfiguration.isDefaultClusterDuplicateDetection());
|
||||||
|
|
||||||
MessageLoadBalancingType messageLoadBalancingType;
|
MessageLoadBalancingType messageLoadBalancingType;
|
||||||
|
|
|
@ -1283,6 +1283,9 @@ public interface ActiveMQServerLogger extends BasicLogger {
|
||||||
format = Message.Format.MESSAGE_FORMAT)
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
void negativeGlobalAddressSize(long size);
|
void negativeGlobalAddressSize(long size);
|
||||||
|
|
||||||
|
@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)
|
@LogMessage(level = Logger.Level.ERROR)
|
||||||
@Message(id = 224000, value = "Failure in initialisation", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 224000, value = "Failure in initialisation", format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
|
|
@ -317,6 +317,10 @@ public class ClusterController implements ActiveMQComponent {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handlePacket(Packet packet) {
|
public void handlePacket(Packet packet) {
|
||||||
|
if (!isStarted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!authorized) {
|
if (!authorized) {
|
||||||
if (packet.getType() == PacketImpl.CLUSTER_CONNECT) {
|
if (packet.getType() == PacketImpl.CLUSTER_CONNECT) {
|
||||||
ClusterConnection clusterConnection = acceptorUsed.getClusterConnection();
|
ClusterConnection clusterConnection = acceptorUsed.getClusterConnection();
|
||||||
|
|
Loading…
Reference in New Issue