Hi Romain,

> I cant dig into it for 2 weeks but you should go twice in the scanner and
> the second time with the webapp classloader. If the class cant be loaded
> you have another issue.

yes, you're right, CDIScanner.init() is called a second time, and in this
call the class loading succeeeds.
However, the bean class is still not added to the list of classes since the
condition in the final if() evals to false:

                // 1. this classloader is the good one
                // 2. the classloader is the appclassloader one and we are
in the ear parent
                if (!filterByClassLoader
                        || comparator.isSame(cl) || (cl.equals(scl) &&
startupObject.getWebContext() == null)) {
                    classes.add(clazz);
                }

Now, when I force classes.add(clazz), the bean seems to be set-up correctly
by BeansDeployer.defineManagedBean(),
but it still is not injected into the Facelet, so I'm quite puzzled...

-- Johannes





--
View this message in context: 
http://openejb.979440.n4.nabble.com/Deployment-of-CDI-beans-does-not-work-for-WARs-wrapped-in-an-EAR-tp4657110p4657196.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Reply via email to