use of org.apache.camel.spring.SpringRouteBuilder in project camel by apache.
the class QueueToQueueTransactionTest method testRollbackUsingXmlQueueToQueue.
@Test
public void testRollbackUsingXmlQueueToQueue() throws Exception {
// configure routes and add to camel context
context.addRoutes(new SpringRouteBuilder() {
@Override
public void configure() throws Exception {
Policy required = lookup("PROPAGATION_REQUIRED_POLICY", SpringTransactionPolicy.class);
from("activemq:queue:foo?transacted=true").policy(required).process(new ConditionalExceptionProcessor()).to("activemq:queue:bar?transacted=true");
}
});
assertResult();
}
Aggregations