activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-157) Connection factory ignores HA property when serialized to uri
Date Wed, 22 Jul 2015 16:45:04 GMT

    [ https://issues.apache.org/jira/browse/ARTEMIS-157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14637159#comment-14637159
] 

ASF GitHub Bot commented on ARTEMIS-157:
----------------------------------------

GitHub user clebertsuconic opened a pull request:

    https://github.com/apache/activemq-artemis/pull/94

    ARTEMIS-157 fixing isHA on connectionFactory

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/clebertsuconic/activemq-artemis master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/94.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #94
    
----
commit 02ca3d17745392c199b083f4acb0f17433851675
Author: Clebert Suconic <clebertsuconic@apache.org>
Date:   2015-07-22T16:17:37Z

    ARTEMIS-157 fixing isHA on connectionFactory

----


> Connection factory ignores HA property when serialized to uri 
> --------------------------------------------------------------
>
>                 Key: ARTEMIS-157
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-157
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.0.0
>            Reporter: Miroslav Novak
>             Fix For: 1.0.1
>
>
> Connection factory's HA attribute is ignored when convertint to URI. This has consequence
that standalone JMS client is not able to failover from to live to backup because it sets
ha=false be default.
> Problem seems to be in method URISchema.getData:234:
> {code}
>  public static String getData(List<String> ignored, Object... beans) throws Exception
>    {
>       StringBuilder sb = new StringBuilder();
>       synchronized (beanUtils)
>       {
>          for (Object bean : beans)
>          {
>             if (bean != null)
>             {
>                PropertyDescriptor[] descriptors = beanUtils.getPropertyUtils().getPropertyDescriptors(bean);
>                for (PropertyDescriptor descriptor : descriptors)
>                {
>                   if (descriptor.getReadMethod() != null && descriptor.getWriteMethod()
!= null && isWriteable(descriptor, ignored))
>                   {
>                      String value = beanUtils.getProperty(bean, descriptor.getName());
>                      if (value != null)
>                      {
>                         sb.append("&").append(descriptor.getName()).append("=").append(value);
>                      }
>                   }
>                }
>             }
>          }
>       }
>       return sb.toString();
>    }
> {code}
> HA attribute is ignored because descriptor.getWriteMethod() != null in if statement is
false which means that there is no found any setHA() method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message