camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascal J <jaco...@mipih.fr>
Subject How to do that in Camel XML (again) ?
Date Thu, 18 Oct 2007 14:49:06 GMT

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.

TIA.

Pascal J.
-- 
View this message in context: http://www.nabble.com/How-to-do-that-in-Camel-XML-%28again%29---tf4647505s22882.html#a13276113
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message