Here is my understanding of things that needs to be done if Guice - Camel and
XML DSL have to work together
1. create a ServletContextListener which would do the following
a. extracts Routes from the XML
b. create a JNDI Registry instance (GuiceyFruit implementation)
c. pass in the routes to create the injector as below
Injector injector = Guice.createInjector(new
CamelModuleWithRouteTypes(Set<>));
d. create a CamelContext
CamelContext camelContext = injector.getInstance(CamelContext.class);
e. set the context in servletcontext which can be looked up and used later
2. use existing servlet module as an entry point for triggering rest:// and
servlet:// endpoints
Let me know if my understanding is correct here..
Appreciate the help!
Regards,
-Yogesh
XML DSL have to work together
1. create a ServletContextListener which would do the following
a. extracts Routes from the XML
b. create a JNDI Registry instance (GuiceyFruit implementation)
c. pass in the routes to create the injector as below
Injector injector = Guice.createInjector(new
CamelModuleWithRouteTypes(Set<>));
d. create a CamelContext
CamelContext camelContext = injector.getInstance(CamelContext.class);
e. set the context in servletcontext which can be looked up and used later
2. use existing servlet module as an entry point for triggering rest:// and
servlet:// endpoints
Let me know if my understanding is correct here..
Appreciate the help!
Regards,
-Yogesh