Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 53210 invoked from network); 13 Jul 2008 12:27:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jul 2008 12:27:52 -0000 Received: (qmail 67503 invoked by uid 500); 13 Jul 2008 12:27:52 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 67483 invoked by uid 500); 13 Jul 2008 12:27:52 -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 67472 invoked by uid 99); 13 Jul 2008 12:27:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Jul 2008 05:27:52 -0700 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; Sun, 13 Jul 2008 12:27:06 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 49049234C164 for ; Sun, 13 Jul 2008 05:27:00 -0700 (PDT) Message-ID: <1945704044.1215952020284.JavaMail.jira@brutus> Date: Sun, 13 Jul 2008 05:27:00 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-713) FileProducer - consumes file instead of producing! In-Reply-To: <1877837654.1215949860305.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-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44246#action_44246 ] Claus Ibsen commented on CAMEL-713: ----------------------------------- Added new header on the in message // lets store the name we really used in the header, so end-users can retrieve it message.setHeader(FileComponent.HEADER_FILE_NAME_PRODUCED, answer.getAbsolutePath()); Remember to add this to wiki > FileProducer - consumes file instead of producing! > -------------------------------------------------- > > Key: CAMEL-713 > URL: https://issues.apache.org/activemq/browse/CAMEL-713 > Project: Apache Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 1.3.0, 1.4.0 > Reporter: Claus Ibsen > Assignee: Claus Ibsen > Priority: Critical > Fix For: 1.5.0 > > > The strange code in the FileProducer that if the exchange is out capable it will poll the file instead bites us big time. > James must have had a beer and a fancy moment when he created the code. Something with a dynamic receipentlist where the endpoints should be polled from a file but the expression uses a Producer when the endpoints is created. For the file it should consume instead but it doesn't. Any basically it should consume instead. > It also bites us when we send an InOut exchange to the FileProducer it will *not* produce the file but consume it and there is no file so nothing happens. > This code > {code} > public class FileBackupTest extends ContextTestSupport { > public void testMailGeneration() throws Exception { > MockEndpoint mock = getMockEndpoint("mock:result"); > mock.expectedMessageCount(1); > template.requestBody("seda:mails", "Hello World"); > mock.assertIsSatisfied(); > } > protected RouteBuilder createRouteBuilder() throws Exception { > return new RouteBuilder() { > public void configure() throws Exception { > from("seda:mails") > .to("file:target/mails") > .to("mock:result"); > } > }; > } > {code} > Would not create a file in target/mails folder as we are using template.*request* that is an InOut MEP. > I will fix it by removing the strange consumer code in the FileProducer and change the fancy dynamic recepientlist test (SimulatorTest), to not use file based endpoints. > It could be a blocker for the 1.4 release and we should consider creating a new RC! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.