return routeBuilder;
}
public JAXBContext getJaxbContext() {
if ( this.jaxbContext == null ) {
JaxbDataFormat def = new JaxbDataFormat();
def.setPrettyPrint( true );
// TODO does not work: def.setContextPath( "org.drools.camel.testdomain:org.drools.pipeline.camel" );
def.setContextPath( "org.drools.pipeline.camel" );
// create a jaxbContext for the test to use outside of Camel.
StatefulKnowledgeSession ksession1 = (StatefulKnowledgeSession) node.get( "ksession1",
CommandExecutor.class );
KnowledgeBase kbase = ksession1.getKieBase();
ClassLoader originalCl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader( ((KnowledgeBaseImpl) kbase).getRootClassLoader() );
def = DroolsPolicy.augmentJaxbDataFormatDefinition( def );
org.apache.camel.converter.jaxb.JaxbDataFormat jaxbDataformat = (org.apache.camel.converter.jaxb.JaxbDataFormat) def.getDataFormat( this.context.getRoutes().get( 0 ).getRouteContext() );
jaxbDataformat.setCamelContext(routeBuilder.getContext());
try {
jaxbDataformat.start();
} catch (Exception e) {