-
1. WELD-CDI EAR AND WAR
nickarls Feb 23, 2011 10:21 AM (in response to jgautier)So you mean war2 beans are not visible from e.g pages within war2 itself? Check the WELD JIRA if there it's a known issues and file a new one if you can't find any matches, please.
-
2. WELD-CDI EAR AND WAR
jgautier Feb 23, 2011 10:53 AM (in response to nickarls)Correct, war2 backing beans are not visible within war2.
I'm unable to lookup a contextual reference for a mypackage2 bean from a class located in mypackage2.
JIRA jbas-8683 looks related but does not explain the problem completly, I'm still searching in JIRA
-
3. Re: WELD-CDI EAR AND WAR
jgautier Feb 24, 2011 9:30 AM (in response to jgautier)Downloading jboss6 sources and debugging helped, the problem has to deal with org.jboss.weld.bootstrap.BeanDeployer class.
Using breakpoints in org.jboss.weld.bootstrap.BeanDeployment confirmed that iterator returned by the loadClasses() method is correct.
But, when this collection of classes is added to BeanDeployer, the following code snippet throws an exception (addClass method)
Class<?> clazz = null;
try
{
clazz = resourceLoader.classForName(className);
}
catch (ResourceLoadingException e)
{
log.debug(IGNORING_CLASS_DUE_TO_LOADING_ERROR, className);
xlog.catching(DEBUG, e);
}
Inspecting beanmanager instance properties showed me that the wrong ResourceLoader is in use.
Surprisingly, the BaseClassLoader of mywebapp1.war is used in a BeanDeployment instance of mywebapp2.war.
Any idea why one classloder is used for loading classes in BeanDeployment.loadClasses() method and another one in BeanDeployer constructor ?
Jérôme
-
4. WELD-CDI EAR AND WAR
jaikiran Feb 25, 2011 10:47 AM (in response to jgautier)Please file a JIRA for this here https://jira.jboss.org/browse/JBAS