geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim McConnell <tim.mcco...@gmail.com>
Subject Re: ClassFinder questions/problems -- annotation processing
Date Wed, 07 Feb 2007 06:19:34 GMT
Hi Dain, What you suggest does make a lot of sense. But for the 
stateless-calculator ear file (i.e., 
calculator-stateless-ear-2[1].0-M2.ear) I would then expect to find the 
calculator-stateless-ear-2[1].0-M2.jar file on one of the parent 
classloaders for the WAR classloader in AbstractWebModuleBuilder. It's not, 
so I suspect there is a bug somewhere as you suggest. I shall investigate 
further tomorrow. Thanks for the pointer....

Dain Sundstrom wrote:
> 
> On Feb 6, 2007, at 12:49 PM, David Blevins wrote:
> 
>>
>> On Feb 4, 2007, at 7:19 PM, Tim McConnell wrote:
>>
>>> Hi again Dave, after your recommendation below to do all the 
>>> annotation discovery during the installModule phase of deployment 
>>> ClassFinder is working much better for me. I do still have another 
>>> scenario I'd appreciate some advice on. It seems that when an EJB EAR 
>>> file (with embedded JAR and WAR files) gets deployed in Geronimo, 
>>> there are two builders invoked: e.g., 
>>> TomcatModuleBuilder/AbstractWebModuleBuilder and EJBModuleBuilder 
>>> such that the embedded JAR file is not added to the 
>>> ClassPath/ClassLoader when the WAR is deployed (I assume this is the 
>>> way it should work since I haven't changed it--yet). So, if there are 
>>> annotations in the WAR class files pointing to classes in the JAR 
>>> file, we'll still encounter NoClassDefException(s). I can just add 
>>> the JAR files in the EAR to the classpath of the WAR, which is what 
>>> I've done to get around the problem, but I'm not sure this is the 
>>> best alternative. Do you have any thoughts?? Thanks much
>>
>> Those should be added automatically via the deployment system.  Very 
>> puzzling.  Dain, did you see anything like this when you did that hack 
>> for @EJB annotation support in Servlets?
> 
> Nope.  The WAR class loader is a child of the EAR class loader so the 
> WAR should "see" all of the jars in the ear.  If that is not the case, 
> then there is a bug.
> 
> -dain
> 

-- 
Thanks,
Tim McConnell

Mime
View raw message