I played a little bit with the Configuration. The beans are put correctly in the jndi tree. If a resolve them manually everything works perflectly. But I don't want to replace every Inject with a JNDI lookup. As you can see both wars are in the same classpath, cause I don't get no ClassNotFoundException. What am I doing wrong?
Are these separately deployed WAR files, or are they contained with an enveloping EAR file?
The default behaviour is that separate deployments cannot see each other's classes.
They are seperateley deployed. I know that the classloaders are isolated in different deployments, but as I mentioned before I added one war as a dependency for the other in the manifest.mf. This works because I can "inject" via jndi and don't get a ClassNotFoundException.
What do you mean exactly by:
"inject" via jndi
1 of 1 people found this helpful
This works because I can "inject" via jndi and don't get a ClassNotFoundException.
This is really not a classloading issue.
It's the way CDI resolves dependencies / injections.
And by default, it of course doesn't cross deployment boundaries -- no matter what/how you configure classloading.
but how can I inject across multiple dependencies ?
did you find a solution?