cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <>
Subject Re: RCL goal refactorings / acegi
Date Wed, 09 Apr 2008 11:29:34 GMT
Patrick Heiden wrote:
> Could you give a hint on where to dig inside cocoons code to have a look for
> myself meanwhile? Would be nice.

Sure. The Maven 2 plugin can be found at It
contains all the stuff that creates a small web application for a block so that
it becomes runnable in a servlet container.

The integration of the RCL is done by intercepting all requests (servlets,
servlet filters, listeners) and replacing the classloader with a reloading
classloader implementation. This code can be found at

The third module is the spring reloader
that wraps a Spring context and performs the restarts of the Spring application
context whenever necessary.

Another hint that might help:
When a class or an interface, that is loaded by the RCL, is proxied or rewritten 
by Spring AOP, this leads to exceptions after the first reload. I guess this is 
a problem with the RCL implementation (Apache Commons JCI) but I haven't had 
time to write a test case that proves this statement.

Apart from problems with Spring Security and Spring AOP, the third known issue 
is session handling. If you put an object that is loaded by the reloading 
classloader into the session, you will run into a class cast exception after the 
first reload occured because the instance of the reloading classloader has changed.

If you want to route around these problems, create a module that contains all 
those classes that should not be loaded by the reloading classloader and add it 
as a dependency to your module.


Reinhard Pötz                            Managing Director, {Indoqa} GmbH

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message