ARTEMIS-1180: Artemis is logging warnings during server shut down
This commit is contained in:
parent
15bb4d2c61
commit
2443eaaa00
|
@ -472,7 +472,7 @@ public final class ClusterManager implements ActiveMQComponent {
|
|||
|
||||
clusterLocators.add(serverLocator);
|
||||
|
||||
Bridge bridge = new BridgeImpl(serverLocator, config.getInitialConnectAttempts(), config.getReconnectAttempts(), config.getReconnectAttemptsOnSameNode(), config.getRetryInterval(), config.getRetryIntervalMultiplier(), config.getMaxRetryInterval(), nodeManager.getUUID(), new SimpleString(config.getName()), queue, executorFactory.getExecutor(), FilterImpl.createFilter(config.getFilterString()), SimpleString.toSimpleString(config.getForwardingAddress()), scheduledExecutor, transformer, config.isUseDuplicateDetection(), config.getUser(), config.getPassword(), server.getStorageManager());
|
||||
Bridge bridge = new BridgeImpl(serverLocator, config.getInitialConnectAttempts(), config.getReconnectAttempts(), config.getReconnectAttemptsOnSameNode(), config.getRetryInterval(), config.getRetryIntervalMultiplier(), config.getMaxRetryInterval(), nodeManager.getUUID(), new SimpleString(config.getName()), queue, executorFactory.getExecutor(), FilterImpl.createFilter(config.getFilterString()), SimpleString.toSimpleString(config.getForwardingAddress()), scheduledExecutor, transformer, config.isUseDuplicateDetection(), config.getUser(), config.getPassword(), server);
|
||||
|
||||
bridges.put(config.getName(), bridge);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ import org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryInternal
|
|||
import org.apache.activemq.artemis.core.client.impl.ClientSessionInternal;
|
||||
import org.apache.activemq.artemis.core.client.impl.ServerLocatorInternal;
|
||||
import org.apache.activemq.artemis.core.filter.Filter;
|
||||
import org.apache.activemq.artemis.core.persistence.StorageManager;
|
||||
import org.apache.activemq.artemis.core.server.ActiveMQServer;
|
||||
import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
|
||||
import org.apache.activemq.artemis.core.server.HandleStatus;
|
||||
import org.apache.activemq.artemis.core.server.LargeServerMessage;
|
||||
|
@ -152,6 +152,8 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
|
|||
|
||||
private boolean keepConnecting = true;
|
||||
|
||||
private ActiveMQServer server;
|
||||
|
||||
public BridgeImpl(final ServerLocatorInternal serverLocator,
|
||||
final int initialConnectAttempts,
|
||||
final int reconnectAttempts,
|
||||
|
@ -170,9 +172,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
|
|||
final boolean useDuplicateDetection,
|
||||
final String user,
|
||||
final String password,
|
||||
final StorageManager storageManager) {
|
||||
final ActiveMQServer server) {
|
||||
|
||||
this.sequentialID = storageManager.generateID();
|
||||
this.sequentialID = server.getStorageManager().generateID();
|
||||
|
||||
this.reconnectAttempts = reconnectAttempts;
|
||||
|
||||
|
@ -209,6 +211,8 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
|
|||
this.user = user;
|
||||
|
||||
this.password = password;
|
||||
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
public static final byte[] getDuplicateBytes(final UUID nodeUUID, final long messageID) {
|
||||
|
@ -606,7 +610,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
|
|||
|
||||
@Override
|
||||
public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) {
|
||||
if (server.isStarted()) {
|
||||
ActiveMQServerLogger.LOGGER.bridgeConnectionFailed(failedOver);
|
||||
}
|
||||
|
||||
synchronized (connectionGuard) {
|
||||
keepConnecting = true;
|
||||
|
|
|
@ -37,8 +37,8 @@ import org.apache.activemq.artemis.api.core.management.ResourceNames;
|
|||
import org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryInternal;
|
||||
import org.apache.activemq.artemis.core.client.impl.ServerLocatorInternal;
|
||||
import org.apache.activemq.artemis.core.filter.Filter;
|
||||
import org.apache.activemq.artemis.core.persistence.StorageManager;
|
||||
import org.apache.activemq.artemis.core.postoffice.BindingType;
|
||||
import org.apache.activemq.artemis.core.server.ActiveMQServer;
|
||||
import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
|
||||
import org.apache.activemq.artemis.core.server.Queue;
|
||||
import org.apache.activemq.artemis.core.server.cluster.ActiveMQServerSideProtocolManagerFactory;
|
||||
|
@ -102,14 +102,14 @@ public class ClusterConnectionBridge extends BridgeImpl {
|
|||
final boolean useDuplicateDetection,
|
||||
final String user,
|
||||
final String password,
|
||||
final StorageManager storageManager,
|
||||
final ActiveMQServer server,
|
||||
final SimpleString managementAddress,
|
||||
final SimpleString managementNotificationAddress,
|
||||
final MessageFlowRecord flowRecord,
|
||||
final TransportConfiguration connector,
|
||||
final String storeAndForwardPrefix) {
|
||||
super(targetLocator, initialConnectAttempts, reconnectAttempts, 0, // reconnectAttemptsOnSameNode means nothing on the clustering bridge since we always try the same
|
||||
retryInterval, retryMultiplier, maxRetryInterval, nodeUUID, name, queue, executor, filterString, forwardingAddress, scheduledExecutor, transformer, useDuplicateDetection, user, password, storageManager);
|
||||
retryInterval, retryMultiplier, maxRetryInterval, nodeUUID, name, queue, executor, filterString, forwardingAddress, scheduledExecutor, transformer, useDuplicateDetection, user, password, server);
|
||||
|
||||
this.discoveryLocator = discoveryLocator;
|
||||
|
||||
|
|
|
@ -806,7 +806,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
|
|||
targetLocator.addIncomingInterceptor(new IncomingInterceptorLookingForExceptionMessage(manager, executorFactory.getExecutor()));
|
||||
MessageFlowRecordImpl record = new MessageFlowRecordImpl(targetLocator, eventUID, targetNodeID, connector, queueName, queue);
|
||||
|
||||
ClusterConnectionBridge bridge = new ClusterConnectionBridge(this, manager, targetLocator, serverLocator, initialConnectAttempts, reconnectAttempts, retryInterval, retryIntervalMultiplier, maxRetryInterval, nodeManager.getUUID(), record.getEventUID(), record.getTargetNodeID(), record.getQueueName(), record.getQueue(), executorFactory.getExecutor(), null, null, scheduledExecutor, null, useDuplicateDetection, clusterUser, clusterPassword, server.getStorageManager(), managementService.getManagementAddress(), managementService.getManagementNotificationAddress(), record, record.getConnector(), storeAndForwardPrefix);
|
||||
ClusterConnectionBridge bridge = new ClusterConnectionBridge(this, manager, targetLocator, serverLocator, initialConnectAttempts, reconnectAttempts, retryInterval, retryIntervalMultiplier, maxRetryInterval, nodeManager.getUUID(), record.getEventUID(), record.getTargetNodeID(), record.getQueueName(), record.getQueue(), executorFactory.getExecutor(), null, null, scheduledExecutor, null, useDuplicateDetection, clusterUser, clusterPassword, server, managementService.getManagementAddress(), managementService.getManagementNotificationAddress(), record, record.getConnector(), storeAndForwardPrefix);
|
||||
|
||||
targetLocator.setIdentity("(Cluster-connection-bridge::" + bridge.toString() + "::" + this.toString() + ")");
|
||||
|
||||
|
|
Loading…
Reference in New Issue