Java 类org.apache.camel.cdi.CdiCamelContext 实例源码

项目:camel-cdi-drools-test    文件:CdiTest.java   
@Before
public void createCamelContext() throws Exception {
    Weld weld = new Weld();
    container = weld.initialize();

    camelContext =  container.instance().select(CdiCamelContext.class).get();
}
项目:camel-cdi-drools-test    文件:RestEndpointTest.java   
@Before
public void setup() throws Exception {
    Weld weld = new Weld();
    WeldContainer container = weld.initialize();
    container.instance().select(CdiCamelContext.class).get().addRoutes(new CamelDroolsRoute());

    frontend = container.instance().select(ServiceFrontend.class).get();
    dispatcher = MockDispatcherFactory.createDispatcher();
    dispatcher.getRegistry().addSingletonResource(frontend);

}
项目:camel-cdi-drools-test    文件:CamelTest.java   
@Override
protected CamelContext createCamelContext() throws Exception {
    Weld weld = new Weld();
    container = weld.initialize();

    return container.instance().select(CdiCamelContext.class).get();
}