activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: [5.4.2] New XML config issue? Not backward compatible?
Date Wed, 08 Dec 2010 13:09:51 GMT
Can you raise a jira issue to track this, it points to a problem with
the query parsing, it is typically called with the query string minus
the leading '?' but is attempting to jump to the last '?' which is
causing it to pick up the wrong parameter.

from a cursory look, the fix is:

Index: src/main/java/org/apache/activemq/util/URISupport.java
===================================================================
--- src/main/java/org/apache/activemq/util/URISupport.java	(revision 1043162)
+++ src/main/java/org/apache/activemq/util/URISupport.java	(working copy)
@@ -103,7 +103,7 @@

     public static Map<String, String> parseQuery(String uri) throws
URISyntaxException {
         try {
-            uri = uri.substring(uri.lastIndexOf("?") + 1); // get
only the relevant part of the query
+            //uri = uri.substring(uri.lastIndexOf("?") + 1); // get
only the relevant part of the query
             Map<String, String> rc = new HashMap<String, String>();
             if (uri != null) {
                 String[] parameters = uri.split("&");

On 7 December 2010 17:29, benoitx <benoitx@yahoo.com> wrote:
>
> Hi Dejan
>
> Thanks for this... was obvious but..didn't spot it.
>
> Having said that it still does NOT work with
>
> vm://localhost?brokerConfig=xbean:appendium-esb-server-activemq-broker-config.xml%3Fvalidate=false
>
> I get an exception:
>
> java.lan.IllegalArgumentException: Invalid connect parameters:
> {validate=false} at
> org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect( line
> 155 )
> org.apache.activemq.transport.vm.VMTransportFactory.doConnect( line 53 )
> etc
>
> Is there a way to stop the validation (which only appeared with 5.4.2)
> whislt setting it up via the VM transport?
>
> Many thanks
>
> Benoit
>
>
>
> Dejan Bosanac wrote:
>>
>> This you should properly escape the inner url (convert ? to %3F). Can
>> you try something like
>>
>> vm://localhost?brokerConfig=xbean:appendium-esb-server-activemq-broker-config.xml%3Fvalidate=false
>>
>>
>> Cheers
>> --
>> Dejan Bosanac
>> -----------------
>> FuseSource - The experts in open source integration and messaging.
>> Email: dejanb@fusesource.com
>> Web: http://fusesource.com
>> Twitter:  http://twitter.com/dejanb
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>>
>>
>>
>> On Mon, Dec 6, 2010 at 7:22 PM, benoitx <benoitx@yahoo.com> wrote:
>>>
>>> Sorry to come back on this... When we set this up via Spring XML, the
>>> validate=false does not seem to work:
>>>
>>>
>>>    <bean id="amqConnectionFactory"
>>> class="org.apache.activemq.ActiveMQConnectionFactory">
>>>        <constructor-arg
>>> value="vm://localhost?brokerConfig=xbean:appendium-esb-server-activemq-broker-config.xml?validate=false"
>>> />
>>>        <property name="redeliveryPolicy">
>>>            <bean class="org.apache.activemq.RedeliveryPolicy">
>>>                <!-- assuming one re-try per second this amounts to
24
>>> hours
>>> -->
>>>                <property name="maximumRedeliveries" value="86400"
/>
>>>            </bean>
>>>        </property>
>>>    </bean>
>>>
>>> we seem to get this:
>>>
>>>
>>> 2010-12-07 00:17:29,558 ERROR [notifiers.ConnectNotifier#?]
>>> (WrapperListener_start_runner:) Failed to connect/reconnect:
>>> ActiveMQJmsConnector{this=3d31f2b4, started=false, initialised=true,
>>> name='Ap_jmsConnector', disposed=false,
>>> numberOfConcurrentTransactedReceivers=4,
>>> createMultipleTransactedReceivers=true, connected=false,
>>> supportedProtocols=[jms], serviceOverrides=null}. Root Exception was:
>>> Invalid connect parameters: {validate=false}. Type: class
>>> java.lang.IllegalArgumentException
>>>
>>> Any suggestion welcome...
>>>
>>> Thanks!
>>>
>>> Benoit
>>> --
>>> View this message in context:
>>> http://activemq.2283324.n4.nabble.com/5-4-2-New-XML-config-issue-Not-backward-compatible-tp3075377p3075590.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>
>>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/5-4-2-New-XML-config-issue-Not-backward-compatible-tp3075377p3076846.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://blog.garytully.com
http://fusesource.com

Mime
View raw message