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 eca40f2879..e7ee1c1eb1 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 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) 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 e1b0bceb1d..2f50b4811e 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() { 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 036ce3294f..803dfee793 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];