geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <ja...@planet57.com>
Subject Re: PackageBuilderShellMojo (m2) and classloaders
Date Tue, 11 Jul 2006 19:57:11 GMT
>> Was there any reason why the setters were all invoked through  
>> reflection as well?
>
> well, in the m1 plugin the class of the PackageBuilder instance is  
> in a different classloader than the PackageBuilderShell, so I don't  
> see how there is any other way to call the setters.  Am I missing  
> something?  If we said PackageBuilder pb = (PackageBuilder) 
> packageBuilderInstance we'd get a class cast exception.
>
> I think what you've done for m2 should work: if we start getting  
> bizarre class cast exceptions when trying to build configs we'll  
> have to revisit this question.
>
> Note that the m2 plugin had already switched to using the same  
> classloader for PBSM and PB, so the reflective setter calls were  
> pointless.

Okay, I added a comment to the changes I made (which removed the  
reflection) to note that if we run into crazy errors that we should  
re-implement the classloader isolation.

--jason


Mime
View raw message