Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 43910 invoked from network); 25 Sep 2008 10:01:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Sep 2008 10:01:06 -0000 Received: (qmail 1103 invoked by uid 500); 25 Sep 2008 10:01:04 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 1032 invoked by uid 500); 25 Sep 2008 10:01:04 -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 1021 invoked by uid 99); 25 Sep 2008 10:01:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Sep 2008 03:01:04 -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; Thu, 25 Sep 2008 09:59:50 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8F864234C1F6 for ; Thu, 25 Sep 2008 02:59:52 -0700 (PDT) Message-ID: <757959127.1222336792583.JavaMail.jira@brutus> Date: Thu, 25 Sep 2008 02:59:52 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange In-Reply-To: <1341175188.1222156012577.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-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45995#action_45995 ] Claus Ibsen commented on CAMEL-930: ----------------------------------- TODO: bean language as ${bean:MyBean} should be able to be used just as .bean(MyBeanClass.class} = just giving the classname and Camel will instantiate it automatically. > file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange > ----------------------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-930 > URL: https://issues.apache.org/activemq/browse/CAMEL-930 > Project: Apache Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 1.5.0 > Environment: Windows XP, JDK 5, Apache Camel Snapshot > Reporter: Dario Sanna > Assignee: Claus Ibsen > Fix For: 1.5.0 > > > the file expression language , file-producer: date and bean expressions are very usefull, but works only with a FileExchange. > example: > from("sftp://user@host//path?password=password&consumer.setNames=true"). > .setHeader(FileComponent.HEADER_FILE_NAME, file("${date:now:yyyyMMMdd}.out")) > to("file://output_dir"); > The above code will result in a ClassCastException, because the file expresssion language relies on having a FileExchange. > Proposal: > - move the date:now and bean: expression from file to simple > - let sftp send FileExchange, rather than DefaultExchange > - let the file expression language work with DefaultExchange (use header-entries instead of FileExchange.getFile()) > With best regards, Dario -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.