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

Claus Ibsen edited comment on CAMEL-1756 at 7/2/09 10:59 PM:
-------------------------------------------------------------

Hadrian even consumers have a life :)

1)
So if the mandatory parameters is only producer specific, then we end up with 
potentially picking a endpoint from the registry in which is not configured 
exactly as the uri provided by the end user.

Registry contains
{{mail://mymailserver.com?password=cheese&username=claus}}

And end user provides this url to lookup
{{mail://mymailserver.com?fetchSize=10&password=cheese&username=claus}}

If Camel then pickup the endpoint in the registry then the option {{fetchSize}} 
will be ignored and the end user gets an endpoint that does not match.
So we must match all parameters, no matter what.

This is a -1


2)
However what we could do as you said was to rearrange the order of the 
parameters so they will match:
{{mail://mymailserver.com?username=claus&password=cheese}}
{{mail://mymailserver.com?password=cheese&username=claus}}

That is a good idea and a +1

      was (Author: davsclaus):
    Hadrian even consumers have a life :)

1)
So if the mandatory parameters is only producer specific, then we end up with 
potentially picking a endpoint from the registry in which is not configured 
exactly as the uri provided by the end user.

Registry contains
{{mail://mymailserver.com?password=cheese&username=claus}}

And end user provides this url to lookup
{{mail://mymailserver.com?fetchSize=10&password=cheese&username=claus}}

If Camel then pickup the endpoint in the registry then the option {{fetchSize}} 
will be ignored and the end user gets an endpoint that does not match.
So we must match all parameters, no matter what.

This is a -1


2)
However what we could do as you said was to rearrange the order of the 
parameters so they will match:
{{mail://mymailserver.com?username=claus&password=cheese
mail://mymailserver.com?password=cheese&username=claus}}

That is a good idea and a +1
  
> getEndpoint() should match for singleton endpoints even if url does not 
> contain params
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1756
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1756
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 1.6.1, 2.0-M2
>            Reporter: Hadrian Zbarcea
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.6.2, 2.0.0
>
>
> When one uses endpoint injection, if the url does not exactly match, the 
> CamelContext will not find the endpoint (and create a new one).
> I think singleton Endpoint(s) should not be registered with the full url, 
> just with the url stripped of parameters, since they are mostly configuration 
> and not necessarily relevant to the producer.  Also if the configuration of a 
> singleton endpoint will change slightly, an update/recompile of the producer 
> code is no longer necessary.
> I cannot think of a situation in which this improvement would cause problems. 
>  I have a fix for this but I'll wait a few days.  Thoughts?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to