mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-13 13:35:47 +00:00
This closes #94 ARTEMIS-157 - isHA ignored on serialization
This commit is contained in:
commit
414d4e24e8
@ -234,7 +234,7 @@ public abstract class URISchema<T, P>
|
|||||||
PropertyDescriptor[] descriptors = beanUtils.getPropertyUtils().getPropertyDescriptors(bean);
|
PropertyDescriptor[] descriptors = beanUtils.getPropertyUtils().getPropertyDescriptors(bean);
|
||||||
for (PropertyDescriptor descriptor : descriptors)
|
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());
|
String value = beanUtils.getProperty(bean, descriptor.getName());
|
||||||
if (value != null)
|
if (value != null)
|
||||||
|
@ -63,6 +63,17 @@ public class ConnectionOptions
|
|||||||
this.ha = ha;
|
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
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
@ -144,6 +144,7 @@ public class ConnectionFactorySerializationTest extends JMSTestBase
|
|||||||
byte[] x = serialize(cf);
|
byte[] x = serialize(cf);
|
||||||
ActiveMQConnectionFactory y = deserialize(x, ActiveMQConnectionFactory.class);
|
ActiveMQConnectionFactory y = deserialize(x, ActiveMQConnectionFactory.class);
|
||||||
checkEquals(cf, y);
|
checkEquals(cf, y);
|
||||||
|
Assert.assertEquals(cf.isHA(), y.isHA());
|
||||||
TransportConfiguration[] staticConnectors = y.getStaticConnectors();
|
TransportConfiguration[] staticConnectors = y.getStaticConnectors();
|
||||||
Assert.assertEquals(staticConnectors.length, 2);
|
Assert.assertEquals(staticConnectors.length, 2);
|
||||||
TransportConfiguration tc0 = cf.getStaticConnectors()[0];
|
TransportConfiguration tc0 = cf.getStaticConnectors()[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user