use of org.apache.camel.component.routebox.demo.SimpleRouteBuilder in project camel by apache.
the class RouteboxDirectProducerOnlyTest method createInnerContext.
private CamelContext createInnerContext() throws Exception {
// Create a camel context to be encapsulated by the routebox
JndiRegistry innerRegistry = new JndiRegistry(createJndiContext());
BookCatalog catalogBean = new BookCatalog();
innerRegistry.bind("library", catalogBean);
CamelContext innerContext = new DefaultCamelContext(innerRegistry);
innerContext.addRoutes(new SimpleRouteBuilder());
return innerContext;
}
use of org.apache.camel.component.routebox.demo.SimpleRouteBuilder in project camel by apache.
the class RouteboxSedaTest method createInnerContext.
private CamelContext createInnerContext() throws Exception {
// Create a camel context to be encapsulated by the routebox
JndiRegistry innerRegistry = new JndiRegistry(createJndiContext());
BookCatalog catalogBean = new BookCatalog();
innerRegistry.bind("library", catalogBean);
CamelContext innerContext = new DefaultCamelContext(innerRegistry);
innerContext.addRoutes(new SimpleRouteBuilder());
return innerContext;
}
use of org.apache.camel.component.routebox.demo.SimpleRouteBuilder in project camel by apache.
the class RouteboxDefaultContextAndRouteBuilderTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry registry = new JndiRegistry(createJndiContext());
// Wire the routeDefinitions & dispatchStrategy to the outer camelContext where the routebox is declared
List<RouteBuilder> routes = new ArrayList<RouteBuilder>();
routes.add(new SimpleRouteBuilder());
registry.bind("registry", createInnerRegistry());
registry.bind("routes", routes);
registry.bind("strategy", new SimpleRouteDispatchStrategy());
return registry;
}
use of org.apache.camel.component.routebox.demo.SimpleRouteBuilder in project camel by apache.
the class RouteboxDirectTest method createInnerContext.
private CamelContext createInnerContext() throws Exception {
// Create a camel context to be encapsulated by the routebox
JndiRegistry innerRegistry = new JndiRegistry(createJndiContext());
BookCatalog catalogBean = new BookCatalog();
innerRegistry.bind("library", catalogBean);
CamelContext innerContext = new DefaultCamelContext(innerRegistry);
innerContext.addRoutes(new SimpleRouteBuilder());
return innerContext;
}
use of org.apache.camel.component.routebox.demo.SimpleRouteBuilder in project camel by apache.
the class RouteboxDispatchMapTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry registry = new JndiRegistry(createJndiContext());
// Wire the routeDefinitions & dispatchStrategy to the outer camelContext where the routebox is declared
List<RouteBuilder> routes = new ArrayList<RouteBuilder>();
routes.add(new SimpleRouteBuilder());
registry.bind("registry", createInnerRegistry());
registry.bind("routes", routes);
// Wire a dispatch map to registry
Map<String, String> map = new HashMap<String, String>();
map.put("addToCatalog", "seda:addToCatalog");
map.put("findBook", "seda:findBook");
registry.bind("map", map);
return registry;
}
Aggregations