Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 26449 invoked from network); 3 Jul 2009 06:00:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jul 2009 06:00:26 -0000 Received: (qmail 31503 invoked by uid 500); 3 Jul 2009 06:00:36 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 31459 invoked by uid 500); 3 Jul 2009 06:00:36 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 31449 invoked by uid 500); 3 Jul 2009 06:00:36 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 31446 invoked by uid 99); 3 Jul 2009 06:00:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jul 2009 06:00:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jul 2009 06:00:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1FCF5234C045 for ; Thu, 2 Jul 2009 23:00:07 -0700 (PDT) Message-ID: <2068635419.1246600807128.JavaMail.jira@brutus> Date: Thu, 2 Jul 2009 23:00:07 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-1756) getEndpoint() should match for singleton endpoints even if url does not contain params In-Reply-To: <33736935.1245864875491.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52658#action_52658 ] Claus Ibsen commented on CAMEL-1756: ------------------------------------ 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.