Re: configuring Camel with XML DSL and Guice in tomcat

2014-12-14 Thread yogu13
Any thoughts on this?



--
View this message in context: 
http://camel.465427.n5.nabble.com/configuring-Camel-with-XML-DSL-and-Guice-in-tomcat-tp5760657p5760679.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: configuring Camel with XML DSL and Guice in tomcat

2014-12-16 Thread Willem Jiang
I don’t think you need to dependency injection in your XML DSL, as we just look 
up the instance from the registry. Can you give an example that you need to use 
Guice to do the DI work?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 13, 2014 at 9:45:32 PM, yogu13 (yogesh@synechron.com) wrote:
> 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
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/configuring-Camel-with-XML-DSL-and-Guice-in-tomcat-tp5760657.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



Re: configuring Camel with XML DSL and Guice in tomcat

2014-12-19 Thread yogu13
Apologies for the delayed response ... I would like to understand how can
Guice be used in following case : In my sample route below 

 
  
http://camel.apache.org/schema/spring";>
 
 
 
 
 
   Hi ${header.paymentType}
 
 



the myProcessor bean instance was created and set in the SimpleRegistry
using the CamelContextLifecycle. Now I do understand Guice doesnt have
container capabilities like Spring but Guice mandates use of GuicyFruit
Implementation as registry
and i would have couple of more classes injected into my processor by Guice.
so how do i go about dealing in this case ?

Appreciate your help on this.

Regards,
-Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/configuring-Camel-with-XML-DSL-and-Guice-in-tomcat-tp5760657p5760939.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: configuring Camel with XML DSL and Guice in tomcat

2014-12-22 Thread yogu13
Hello,

Any suggestions / pointers ?

Regards,
-Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/configuring-Camel-with-XML-DSL-and-Guice-in-tomcat-tp5760657p5760999.html
Sent from the Camel - Users mailing list archive at Nabble.com.