Hi,

> On 12 Apr 2017, at 18:28, Bernard Ligny <bernard.li...@gmail.com> wrote:
> 
> I am currently refactoring a monolithic webapp using a more
> modular/micro-services approach.
> I'm busy with splitting the numerous existing Camel RouteBuilders into
> separate module.
> 
> The target situation is explained here:
> 
> 
> And the resulting war has the following structure
> 
> 
> Each module contains the following Camel stuff:
> 
> 
> When deployed on my app-server, I notice the following behaviour (with Camel
> 2.18.1).
> 
> 1) As long as this Camel stuff remains in the embedded jars, Camel does
> *NOT* see them. So Camel is not starting at all...
> 
> 2) If I move the various context producers into the webapp module
> (=>ContextFactory class now in WEB-INF/classes instead of
> /WEB-INF/lib/module-i.jar), then Camel is starting... Great ! But the
> started contexts do not detect my routes. So all contexts are empty :-(
> 
> So my conclusion is that Camel-CDI (classloader) expects that everything
> (=context producers as well as route definitions) should be located in
> WEB-INF/classes.
> Is this assumption right ?

Camel CDI is basically a CDI extension so it does not affect the way beans 
archives are being discovered and deployed by the container nor classes are 
being loaded. It solely up to the container, in your case WildFly.

> What are the solutions to make it work ?

I would expect the library JARs packaged within you WAR to be deployed as beans 
archives as long as they have a beans.xml file in module<X>.jar/META-INF 
directory. Is this the case?

There may be some classloading issues but then you should turn to WildFly 
team...

> PS: I'm deploying to Wildfly 10.1.0. 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-CDI-in-a-multi-module-project-tp5797510.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to