Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 5268 invoked from network); 13 Jan 2009 05:16:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jan 2009 05:16:31 -0000 Received: (qmail 30622 invoked by uid 500); 13 Jan 2009 05:16:31 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 30594 invoked by uid 500); 13 Jan 2009 05:16:31 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 30583 invoked by uid 99); 13 Jan 2009 05:16:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 21:16:31 -0800 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; Tue, 13 Jan 2009 05:16:21 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6F06A234C48B for ; Mon, 12 Jan 2009 21:16:00 -0800 (PST) Message-ID: <279613170.1231823760453.JavaMail.jira@brutus> Date: Mon, 12 Jan 2009 21:16:00 -0800 (PST) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Assigned: (CAMEL-1249) MailConfiguration injected into MailComponent by Spring is ignored. In-Reply-To: <2050184817.1231783679341.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen reassigned CAMEL-1249: ---------------------------------- Assignee: Claus Ibsen > MailConfiguration injected into MailComponent by Spring is ignored. > ------------------------------------------------------------------- > > Key: CAMEL-1249 > URL: https://issues.apache.org/activemq/browse/CAMEL-1249 > Project: Apache Camel > Issue Type: Bug > Components: camel-mail > Affects Versions: 1.4.0, 1.5.0 > Environment: Camel > Reporter: Michael Chen > Assignee: Claus Ibsen > > A Camel org.apache.camel.component.mail.MailComponent is configured via Spring as: > {code} > > > > pop3 > mail.abc.com > test > test > > > > {code} > It is silly to use the hard-coded URI in Java code to create a mail endpoint. Instead I want to use the above method to specify everything (I mean everything) about how to access a mail server (send or receive) in different deployments. Up to Camel 1.5, line 73 of MailComponent.createEndpoint() ignored the MailConfiguration variable MailComponent.configuration and created a new one to parse the URI. This defeats the Spring injection above, which is recommended by Camel's own User's Guide. > Line 73 and 74 should be changed from: > {quote} > MailConfiguration config = new MailConfiguration(); > config.configure(url); > {quote} > to > {quote} > configuration.configure(url); > {quote} > In addition, if the uri parameter equals the component name, createEndpoint() should not parse it at all, so that the following route builder will create the mail endpoint solely according to the Spring injection of MailConfiguration: > {quote} > from("mailbox").to("my_queue"); > {quote} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.