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

Claus Ibsen commented on CAMEL-9585:
------------------------------------

This sounds a bit dangerous as JMS uses often a connection pool and may cache 
connections and whatnot. For this to have somehow a private username/password 
for every request, then you cannot use any kind of pooling as the connection 
must be disconnect and connect before use with the new set of username/password.

What is the use case as I see a danger here. Nobody has before come up with 
such a requirement.

And this would only be possible on the producer side, as the consumer uses the 
username/password you configure when the Camel application startup.

> camel-jms: Support dynamic username/password settings
> -----------------------------------------------------
>
>                 Key: CAMEL-9585
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9585
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jms
>            Reporter: Tomohisa Igarashi
>            Priority: Minor
>
> Right now camel-jms sets username/password when it starts up here
> https://github.com/apache/camel/blob/master/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java#L864-L871
> But it would be great if it can override the credentials per exchange 
> dynamically via exchange header or something like that.
> The 
> org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter 
> has setCredentialsForCurrentThread() method, which looks useful for this 
> purpose.



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

Reply via email to