Look at this:
from("file:request.sql").splitter(body(String.class).tokenize("\n"))
.process(new Processor()
{
public void process(Exchange exchange) throws Exception
{
System.out.println(exchange.getIn());
}
})
.to("jdbc:dataSource")
.process(new Processor()
{
public void process(Exchange exchange) throws Exception
{
System.err.println(exchange.getIn());
}
});
and
from("file:request.sql").splitter(body(String.class).tokenize("\n"))
.process(new Processor()
{
public void process(Exchange exchange) throws Exception
{
System.out.println(exchange.getIn());
}
})
.process(new Processor()
{
public void process(Exchange exchange) throws Exception
{
System.err.println(exchange.getIn());
}
});
In the first example I get 1 output in the System.err.println
In the second example (whithout the to("jdbc:...")) I get all requests
--
View this message in context:
http://www.nabble.com/use-of-splitter-component-to-split-serialised-JaxB-tp10899172s22882p15208068.html
Sent from the Camel - Users mailing list archive at Nabble.com.