camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: How to do that in Camel XML (again) ?
Date Mon, 29 Oct 2007 14:33:36 GMT
On 18/10/2007, pascal J <jacob.p@mipih.fr> wrote:
>
> How would you express the following using the Camel XML language ?
>
> // START SNIPPET: example
> public class EtlRoutes extends SpringRouteBuilder {
>     public void configure() throws Exception {
>         from("file:src/data?noop=true").convertBodyTo(PersonDocument.class)
>         //  .intercept(transactionInterceptor())
>             .to("jpa:org.apache.camel.example.etl.CustomerEntity");
>
>         // the following will dump the database to files
>
> from("jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false?consumer.delay=3000&consumeLockEntity=false")
>             .setHeader(FileComponent.HEADER_FILE_NAME,
> el("${in.body.userName}.xml"))
>             .to("file:target/customers?append=false");
>     }
> }
> // END SNIPPET: example
>
>
> I am expecially interrested by the convertBody(), the intercept() and the
> setHeader() functionality.

We've not ported those over yet to the XML language; so until then you
need to register the Processor for these steps in your spring.xml and
use <process ref="name"/> to use those.

-- 
James
-------
http://macstrac.blogspot.com/

Open Source SOA
http://open.iona.com

Mime
View raw message