cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: question about jar conflicts/java class loading conflicts
Date Thu, 18 Nov 2004 18:23:56 GMT
Eric Bloch wrote:
> Hey there,
> 
> I'm a developer on another Java open source project and I've noticed 
> that cocoon shares some similar problems with our project.

Cool, we love lazlo ;-) several people are thinking about writing a 
LazloSerializer for cocoon so that we can have cocoon forms 
automatically rendered as lazlo objects. Are you guys interested in 
helping out?

> In particular, delployments of our webapp see a variety of different and 
> sometimes _very_ difficult to understand class-loading conflicts in 
> different servlet containers.

yep

> And we'd like to come to some real solution to avoid these in the 
> future.  I'm wondering if cocoon developers have any good advice here.
> 
> FYI, we are actually considering re-building the java classes in *every* 
> external jar we'd put in our web app's WEB-INF directory and 
> name-spacing *every* external class with our namepsace, but this is 
> costly in terms of maintenance  and is non-trivial with code that does 
> reflection, etc...

I personally think this creates more problems than it solves.

> We've also considered writing our own class-loader but we think this 
> won't solve the problem (and could make it worse, in fact).
> 
> Any good advice?

Take a look at the work that we are doing for the new cocoon kernel

  http://svn.apache.org/repos/asf/cocoon/whiteboard/kernel/

where a complete sandbox oriented classloading isolation can be 
performed using a mix of clever interface proxying, dependency injection 
and classloading tricks.

not trivial, but it works and even for static lookups and I think it 
would solve the problem and work across containers.

> -Eric
> bloch@laszlosystems.com
> 
> ps... our project is described at http://openlaszlo.org

Oh, yeah, we know ;-)

-- 
Stefano.


Mime
View raw message