activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-157 fixing isHA on connectionFactory
Date Wed, 22 Jul 2015 17:02:59 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 0bd784df4 -> 414d4e24e


ARTEMIS-157 fixing isHA on connectionFactory


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

Branch: refs/heads/master
Commit: d5dde68f0cf9e8f73ef5c3d6274459cf6d0e3eed
Parents: 0bd784d
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Wed Jul 22 17:17:37 2015 +0100
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Jul 22 17:46:04 2015 +0100

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/utils/uri/URISchema.java |  2 +-
 .../apache/activemq/artemis/uri/ConnectionOptions.java   | 11 +++++++++++
 .../connection/ConnectionFactorySerializationTest.java   |  1 +
 3 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d5dde68f/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
index eca40f2..e7ee1c1 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
@@ -234,7 +234,7 @@ public abstract class URISchema<T, P>
                PropertyDescriptor[] descriptors = beanUtils.getPropertyUtils().getPropertyDescriptors(bean);
                for (PropertyDescriptor descriptor : descriptors)
                {
-                  if (descriptor.getReadMethod() != null && descriptor.getWriteMethod()
!= null && isWriteable(descriptor, ignored))
+                  if (descriptor.getReadMethod() != null && isWriteable(descriptor,
ignored))
                   {
                      String value = beanUtils.getProperty(bean, descriptor.getName());
                      if (value != null)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d5dde68f/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/ConnectionOptions.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/ConnectionOptions.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/ConnectionOptions.java
index e1b0bce..2f50b48 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/ConnectionOptions.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/uri/ConnectionOptions.java
@@ -63,6 +63,17 @@ public class ConnectionOptions
       this.ha = ha;
    }
 
+   /** Se need both options (ha / HA in case of typos on the URI) */
+   public boolean isHA()
+   {
+      return ha;
+   }
+
+   public void setHA(boolean ha)
+   {
+      this.ha = ha;
+   }
+
    @Override
    public String toString()
    {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d5dde68f/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
index 036ce32..803dfee 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
@@ -144,6 +144,7 @@ public class ConnectionFactorySerializationTest extends JMSTestBase
       byte[] x = serialize(cf);
       ActiveMQConnectionFactory y = deserialize(x, ActiveMQConnectionFactory.class);
       checkEquals(cf, y);
+      Assert.assertEquals(cf.isHA(), y.isHA());
       TransportConfiguration[] staticConnectors = y.getStaticConnectors();
       Assert.assertEquals(staticConnectors.length, 2);
       TransportConfiguration tc0 = cf.getStaticConnectors()[0];


Mime
View raw message