use of org.apache.camel.converter.jaxb.JaxbDataFormat in project camel by apache.
the class DataFormatConcurrentTest method testUnmarshalConcurrent.
@Test
public void testUnmarshalConcurrent() throws Exception {
template.setDefaultEndpointUri("direct:unmarshal");
final CountDownLatch latch = new CountDownLatch(warmupCount + testCycleCount);
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:unmarshal").unmarshal(new JaxbDataFormat("org.apache.camel.example")).process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
latch.countDown();
}
});
}
});
unmarshal(latch);
}
use of org.apache.camel.converter.jaxb.JaxbDataFormat in project camel by apache.
the class DataFormatDataSetTest method createRouteBuilder.
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
DataFormat jaxb = new JaxbDataFormat("org.apache.camel.example");
// use 5 concurrent threads to do marshalling
from("dataset:beer").marshal(jaxb).to("dataset:beer");
}
};
}
Aggregations