[ https://issues.apache.org/activemq/browse/CAMEL-1756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52621#action_52621 ]
Hadrian Zbarcea edited comment on CAMEL-1756 at 7/1/09 1:05 PM: ---------------------------------------------------------------- @Claus, yeah, that's what i was saying in a comment above. However I sense we can do better. Today for instance: {code} mail://mymailserver.com?username=claus&password=cheese mail://mymailserver.com?password=cheese&username=claus {code} are considered different endpoints, I think, although they are obviously the same. Should we force users to keep urls in sync as strings? Maybe if we knew for an endpoint what params are used to make the endpoint unique, let's call them mandatory (yeah, bad name) params arrange them in a predefined order (alphabetically) and strip the others that have no relevance for the producer, but are consumer side configuration? So then the following would be equivalent (assuming only username and password are mandatory for singleton uniqueness): {code} mail://mymailserver.com?password=cheese&username=claus // this being the key mail://mymailserver.com?username=claus&password=cheese mail://mymailserver.com?fetchSize=10&password=cheese&username=claus {code} but different than: {code} mail://mymailserver.com?password=bar&username=hadrian // this being another key {code} Just a though... was (Author: hadrian): @Claus, yeah, that's what i was saying in a comment above. However I sense we can do better. Today for instance: {code} mail://mymailserver.com?username=claus&password=cheese mail://mymailserver.com?password=cheese&username=claus {code} are considered different endpoints, I think, although they are obviously the same. Should we force users to keep urls in sync as strings? Maybe if we knew for an endpoint what params are used to make the endpoint unique, let's call them mandatory (yeah, bad name) params arrange them in a predefined order (alphabetically) and strip the others that have no relevance for the producer, but are consumer side configuration? So then the following would be equivalent {code} mail://mymailserver.com?password=cheese&username=claus // this being the key mail://mymailserver.com?username=claus&password=cheese mail://mymailserver.com?fetchSize=10&password=cheese&username=claus {code} but different then: {code} mail://mymailserver.com?password=bar&username=hadrian // this being another key {code} Just a though... > 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.