activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject activemq-artemis git commit: more fixes to handle null or emty address on cluster connection
Date Tue, 08 Nov 2016 09:15:58 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/ARTEMIS-780 661ea2c4e -> c9b557dfd


more fixes to handle null or emty address on cluster connection


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

Branch: refs/heads/ARTEMIS-780
Commit: c9b557dfd90e14ada5215353dda0508f7bb2ba5d
Parents: 661ea2c
Author: Andy Taylor <andy.tayls67@gmail.com>
Authored: Tue Nov 8 09:12:05 2016 +0000
Committer: Andy Taylor <andy.tayls67@gmail.com>
Committed: Tue Nov 8 09:15:27 2016 +0000

----------------------------------------------------------------------
 .../artemis/core/config/ClusterConnectionConfiguration.java   | 7 -------
 .../artemis/core/deployers/impl/FileConfigurationParser.java  | 2 +-
 .../core/management/impl/ActiveMQServerControlImpl.java       | 2 +-
 .../activemq/artemis/core/server/cluster/ClusterManager.java  | 2 +-
 .../core/server/cluster/impl/ClusterConnectionBridge.java     | 2 --
 .../core/server/cluster/impl/ClusterConnectionImpl.java       | 2 +-
 .../src/main/resources/schema/artemis-configuration.xsd       | 2 +-
 7 files changed, 5 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9b557df/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ClusterConnectionConfiguration.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ClusterConnectionConfiguration.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ClusterConnectionConfiguration.java
index 2cf8ab8..36a5cdf 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ClusterConnectionConfiguration.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ClusterConnectionConfiguration.java
@@ -423,13 +423,6 @@ public final class ClusterConnectionConfiguration implements Serializable
{
          ActiveMQServerLogger.LOGGER.clusterConnectionNotUnique();
          return false;
       }
-
-      if (getAddress() == null) {
-         ActiveMQServerLogger.LOGGER.clusterConnectionNoForwardAddress();
-
-         return false;
-      }
-
       return true;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9b557df/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
index ac0a7a1..796caf2 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
@@ -1324,7 +1324,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
{
    private void parseClusterConnectionConfiguration(final Element e, final Configuration
mainConfig) throws Exception {
       String name = e.getAttribute("name");
 
-      String address = getString(e, "address", null, Validators.NOT_NULL_OR_EMPTY);
+      String address = getString(e, "address", "", Validators.NO_CHECK);
 
       String connectorName = getString(e, "connector-ref", null, Validators.NOT_NULL_OR_EMPTY);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9b557df/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
index fa26c4d..1fb564d 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
@@ -1707,7 +1707,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements
Active
 
       clearIO();
       try {
-         postOffice.sendQueueInfoToQueue(new SimpleString(queueName), new SimpleString(address));
+         postOffice.sendQueueInfoToQueue(new SimpleString(queueName), new SimpleString(address
== null ? "" : address));
 
          GroupingHandler handler = server.getGroupingHandler();
          if (handler != null) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9b557df/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..7d0faba 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
@@ -601,7 +601,7 @@ public final class ClusterManager implements ActiveMQComponent {
                             dg);
          }
 
-         clusterConnection = new ClusterConnectionImpl(this, dg, connector, new SimpleString(config.getName()),
new SimpleString(config.getAddress()), config.getMinLargeMessageSize(), config.getClientFailureCheckPeriod(),
config.getConnectionTTL(), config.getRetryInterval(), config.getRetryIntervalMultiplier(),
config.getMaxRetryInterval(), config.getInitialConnectAttempts(), config.getReconnectAttempts(),
config.getCallTimeout(), config.getCallFailoverTimeout(), config.isDuplicateDetection(), config.getMessageLoadBalancingType(),
config.getConfirmationWindowSize(), config.getProducerWindowSize(), executorFactory, server,
postOffice, managementService, scheduledExecutor, config.getMaxHops(), nodeManager, server.getConfiguration().getClusterUser(),
server.getConfiguration().getClusterPassword(), config.isAllowDirectConnectionsOnly(), config.getClusterNotificationInterval(),
config.getClusterNotificationAttempts());
+         clusterConnection = new ClusterConnectionImpl(this, dg, connector, new SimpleString(config.getName()),
new SimpleString(config.getAddress() != null ? config.getAddress() : ""), config.getMinLargeMessageSize(),
config.getClientFailureCheckPeriod(), config.getConnectionTTL(), config.getRetryInterval(),
config.getRetryIntervalMultiplier(), config.getMaxRetryInterval(), config.getInitialConnectAttempts(),
config.getReconnectAttempts(), config.getCallTimeout(), config.getCallFailoverTimeout(), config.isDuplicateDetection(),
config.getMessageLoadBalancingType(), config.getConfirmationWindowSize(), config.getProducerWindowSize(),
executorFactory, server, postOffice, managementService, scheduledExecutor, config.getMaxHops(),
nodeManager, server.getConfiguration().getClusterUser(), server.getConfiguration().getClusterPassword(),
config.isAllowDirectConnectionsOnly(), config.getClusterNotificationInterval(), config.getClusterNotificationAttempts());
 
          clusterController.addClusterConnection(clusterConnection.getName(), dg, config);
       } else {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9b557df/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 969ab42..793a800 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
@@ -221,8 +221,6 @@ public class ClusterConnectionBridge extends BridgeImpl {
 
          SimpleString notifQueueName = new SimpleString(qName);
 
-         String filterString = flowRecord.getAddress();
-
          SimpleString filter = new SimpleString(ManagementHelper.HDR_BINDING_TYPE + "<>"
+
                                                    BindingType.DIVERT.toInt() +
                                                    " AND " +

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9b557df/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 aa9f0ce..7d35dde 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
@@ -888,7 +888,7 @@ public final class ClusterConnectionImpl implements ClusterConnection,
AfterConn
 
       @Override
       public String getAddress() {
-         return address.toString();
+         return address != null ? address.toString() : "";
       }
 
       /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c9b557df/artemis-server/src/main/resources/schema/artemis-configuration.xsd
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/resources/schema/artemis-configuration.xsd b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
index f288ea6..b40c92c 100644
--- a/artemis-server/src/main/resources/schema/artemis-configuration.xsd
+++ b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
@@ -1283,7 +1283,7 @@
 
    <xsd:complexType name="cluster-connectionType">
       <xsd:sequence>
-         <xsd:element name="address" type="xsd:string" maxOccurs="1" minOccurs="1">
+         <xsd:element name="address" type="xsd:string" maxOccurs="1" minOccurs="0">
             <xsd:annotation>
                <xsd:documentation>
                   name of the address this cluster connection applies to


Mime
View raw message