activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Beattie (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-761) ActiveMQConnectionFactory.setBrokerURL does not set all connection properties corrrectly
Date Mon, 19 Jun 2006 20:47:51 GMT
ActiveMQConnectionFactory.setBrokerURL does not set all connection properties corrrectly
----------------------------------------------------------------------------------------

         Key: AMQ-761
         URL: https://issues.apache.org/activemq/browse/AMQ-761
     Project: ActiveMQ
        Type: Bug

  Components: JMS client  
    Versions: 3.2.2    
 Environment: Windows XP, Java 1.4.1
    Reporter: Jim Beattie
 Attachments: UrlSetterTest.java

If I set the brokerUrl of ActiveMQConnectionFactory using setBrokerURL(), the connection factory
does not reparse all of the properties from the URL.  As a result, when a new connection is
created, some of the properties from the URL specified during the construction of the connection
factory (typically the defaults) are used instead.  Attached is a unit test to demonstrate
the problem.

As a minimum, the following block of code is required in setBrokerURL().  But this doesn't
really fix it because properties settings from the URL used by the constructor may not be
reset by this code.  A structural change may be in order (e.g. just-in-time parsing of the
properties).

       if( brokerURL.indexOf("?")>= 0 ) {
            String options = brokerURL.substring(brokerURL.indexOf("?")+1);
            Map properties = URIHelper.parseQuery(options);
            if (!properties.isEmpty()) {
                BeanUtils.populate(this, properties);
            }   

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message