camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrobens <jrob...@interlated.com.au>
Subject Re: etl example and message conversion
Date Mon, 22 Jun 2009 08:07:48 GMT

Sure - as per camel etl example

public class EtlRoutes extends SpringRouteBuilder {
    public void configure() throws Exception {
        from("file:src/data?noop=true").convertBodyTo(PersonDocument.class)
            .to("jpa:au.com.hearing.talingaBroker.CustomerEntity");

        // the following will dump the database to files
       
from("jpa:au.com.hearing.talingaBroker.CustomerEntity?consumeDelete=false&consumer.delay=3000&consumeLockEntity=false")
            .setHeader(Exchange.FILE_NAME, el("${in.body.userName}.xml"))
            .to("file:target/customers?fileExist=Ignore");
    }
}
-- 
View this message in context: http://www.nabble.com/etl-example-and-message-conversion-tp24142904p24143183.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message