camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] [Resolved] (CAMEL-4329) Username/password ignored when connectionFactory is set in JMS component
Date Sat, 13 Aug 2011 08:48:27 GMT


Claus Ibsen resolved CAMEL-4329.

       Resolution: Fixed
    Fix Version/s: 2.9.0

Thanks for the detailed report

> Username/password ignored when connectionFactory is set in JMS component
> ------------------------------------------------------------------------
>                 Key: CAMEL-4329
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 2.8.0
>         Environment: irrelevant
>            Reporter: Sergey Zolotaryov
>            Assignee: Claus Ibsen
>             Fix For: 2.8.1, 2.9.0
> There is a conflict between 2 properties: connectionFactory and username/password. If
I set both the connectionFactory wins and jms endpoint uses connection factory that is unaware
of username/password specified for the endpoint. 
> We need to use both - we have different systems and use different connections factories
with different username/passwords.
> Let's assume I have a setup with 2 connection factories jmsConnectionFactory1 and jmsConnectionFactory2
and an endpoint jms:queue:myQueue?connectionFactory=jmsConnectionFactory2&username=myuser&password=secret,
here is what happens:
> I see that in JmsComponent:133 you retrieve the first ConnectionFactory (jmsConnectionFactory1)
found in Spring.
> Then in JmsComponent:414 you create a delegating ConnectionFactory which always uses
username/password (with jmsConnectionFactory1) and set it to the endpoint.
> Then in JmsComponent:434 you finally set the right ConnectionFactory (jmsConnectionFactory2)
to the endpoint, though the username/password are lost forever.
> I have solved it for our project by implementing a clone of JmsComponent with overriden
createEndpoint. Move line 434 [setProperties(endpoint.getConfiguration(), parameters);] a
the line immediately after 407 [String password = getAndRemoveParameter(parameters, "password",

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message