ARTEMIS-157 fixing isHA on connectionFactory
This commit is contained in:
parent
0bd784df43
commit
d5dde68f0c
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue