activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [05/17] activemq-artemis git commit: ARTEMIS-1180 Artemis is logging warnings during server shut down
Date Tue, 26 Sep 2017 18:48:53 GMT
ARTEMIS-1180 Artemis is logging warnings during server shut down

(cherry picked from commit 2443eaaa003ef913187c14dbc567544788224821)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/31fa7584
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/31fa7584
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/31fa7584

Branch: refs/heads/1.x
Commit: 31fa7584ab60d06b90b7ba38da633b0f0ed81991
Parents: 6febd5e
Author: Dmitrii Tikhomirov <dtikhomi@redhat.com>
Authored: Wed May 24 15:18:16 2017 +0200
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Sep 26 14:28:05 2017 -0400

----------------------------------------------------------------------
 .../artemis/core/server/cluster/ClusterManager.java     |  2 +-
 .../artemis/core/server/cluster/impl/BridgeImpl.java    | 12 +++++++++---
 .../server/cluster/impl/ClusterConnectionBridge.java    |  6 +++---
 .../core/server/cluster/impl/ClusterConnectionImpl.java |  2 +-
 4 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31fa7584/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
index 96fad97..eddbda4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
@@ -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);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31fa7584/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java
index d928fff..94e28e6 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java
@@ -47,7 +47,7 @@ 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.message.impl.MessageImpl;
-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;
@@ -156,6 +156,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,
@@ -174,7 +176,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
                      final boolean useDuplicateDetection,
                      final String user,
                      final String password,
-                     final StorageManager storageManager) {
+                     final ActiveMQServer server) {
 
       this.reconnectAttempts = reconnectAttempts;
 
@@ -211,6 +213,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)
{
@@ -603,7 +607,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
 
    @Override
    public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID)
{
-      ActiveMQServerLogger.LOGGER.bridgeConnectionFailed(failedOver);
+      if (server.isStarted()) {
+         ActiveMQServerLogger.LOGGER.bridgeConnectionFailed(failedOver);
+      }
 
       synchronized (connectionGuard) {
          keepConnecting = true;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31fa7584/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java
index 3b35c14..96106d5 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java
@@ -37,8 +37,8 @@ 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.message.impl.MessageImpl;
-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.ServerMessage;
@@ -100,13 +100,13 @@ 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) {
       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;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31fa7584/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
index 9e96053..fe72725 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java
@@ -800,7 +800,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());
+      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());
 
       targetLocator.setIdentity("(Cluster-connection-bridge::" + bridge.toString() + "::"
+ this.toString() + ")");
 


Mime
View raw message