mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-07 18:49:14 +00:00
ARTEMIS-151 Fixing tests
This commit is contained in:
parent
9d3866471b
commit
c3448e7029
@ -105,6 +105,10 @@ public class TransportConfiguration implements Serializable {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TransportConfiguration newTransportConfig(String newName) {
|
||||||
|
return new TransportConfiguration(factoryClassName, params, newName);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a TransportConfiguration providing the class name of the {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory}
|
* Creates a TransportConfiguration providing the class name of the {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory}
|
||||||
* and any parameters needed.
|
* and any parameters needed.
|
||||||
|
@ -73,6 +73,11 @@ import org.apache.activemq.artemis.utils.TypedProperties;
|
|||||||
|
|
||||||
public final class ClusterConnectionImpl implements ClusterConnection, AfterConnectInternalListener {
|
public final class ClusterConnectionImpl implements ClusterConnection, AfterConnectInternalListener {
|
||||||
|
|
||||||
|
/** When getting member on node-up and down we have to remove the name from the transport config
|
||||||
|
* as the setting we build here doesn't need to consider the name, so use the same name on all
|
||||||
|
* the instances. */
|
||||||
|
private static final String TRANSPORT_CONFIG_NAME = "topology-member";
|
||||||
|
|
||||||
private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled();
|
private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled();
|
||||||
|
|
||||||
private final ExecutorFactory executorFactory;
|
private final ExecutorFactory executorFactory;
|
||||||
@ -258,7 +263,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
|
|||||||
// a cluster connection will connect to other nodes only if they are directly connected
|
// a cluster connection will connect to other nodes only if they are directly connected
|
||||||
// through a static list of connectors or broadcasting using UDP.
|
// through a static list of connectors or broadcasting using UDP.
|
||||||
if (allowDirectConnectionsOnly) {
|
if (allowDirectConnectionsOnly) {
|
||||||
allowableConnections.addAll(Arrays.asList(staticTranspConfigs));
|
for (TransportConfiguration configuration : staticTranspConfigs) {
|
||||||
|
allowableConnections.add(configuration.newTransportConfig(TRANSPORT_CONFIG_NAME));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -638,7 +645,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if the node is more than 1 hop away, we do not create a bridge for direct cluster connection
|
// if the node is more than 1 hop away, we do not create a bridge for direct cluster connection
|
||||||
if (allowDirectConnectionsOnly && !allowableConnections.contains(topologyMember.getLive())) {
|
if (allowDirectConnectionsOnly && !allowableConnections.contains(topologyMember.getLive().newTransportConfig(TRANSPORT_CONFIG_NAME))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user