[ https://issues.apache.org/activemq/browse/AMQ-761?page=all ]
james strachan resolved AMQ-761. -------------------------------- Fix Version/s: 4.1.0 Resolution: Fixed > ActiveMQConnectionFactory.setBrokerURL does not set all connection properties > corrrectly > ---------------------------------------------------------------------------------------- > > Key: AMQ-761 > URL: https://issues.apache.org/activemq/browse/AMQ-761 > Project: ActiveMQ > Issue Type: Bug > Components: JMS client > Affects Versions: 3.2.2 > Environment: Windows XP, Java 1.4.1 > Reporter: Jim Beattie > Fix For: 4.1.0 > > 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