cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: Shielded class loading between blocks
Date Mon, 20 Nov 2006 12:53:28 GMT
Alexander Klimetschek wrote:
> Another requirement what just popped up is to allow "groups" of servlets 
> that use the same classloader. This is useful if you have some Servlets 
> and jsps that ought to be used together, because the multiple Servlets 
> and JSPs access some singleton / static Java class. Here it is necessary 
> that all servlets and stuff are loaded by the same classloader.
> A simple idea would be to pass the BlockServlet (that will manage the 
> shielding) a parameter "shieldingGroup" that will name a group that uses 
> the same classloader. There should be some kind of static Map which maps 
> that groupname to a classloader so that it can be reused when another 
> BlockServlet with the same groupname comes up.
I think we could solve this by defining a class loader bean for a block
and the various block servlets can reference the same class loader bean.
If no class loader bean is set for the servlet it just uses its own
class loader.

Carsten Ziegeler - Chief Architect

View raw message