cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: [2.2] Support for per sitemap classloading?
Date Fri, 03 Mar 2006 23:36:34 GMT
Reinhard Poetz skrev:
> Torsten Curdt wrote:
>>
>> On 04.03.2006, at 01:54, Carsten Ziegeler wrote:
>>
>>> Some time ago the support for per sitemap classloaders has been  
>>> added to
>>> 2.2; this feature is currently disabled (for making the implementation
>>> for blocks easier I guess).
>>
>>
>> I guess it is just disabled by default because it is a new feature
>>
>>> Now the question is, do we want to support this or is this obsolete  
>>> when
>>> we have the blocks implementation soon? In this case we can simply
>>> remove the classpath handling code, I guess.
>>
>>
>> That's how the class auto-compiling & reloading works in trunk
>> ...does/will the block framework support that then?

What the blocks fw eventually will support depends on what you and 
others want it to support and are prepared to implement ;)

> Yes, that's the plan. Adding it to 
> org.apache.cocoon.blocks.servlet.BlocksManager (module: 
> cocoon-blocks-fw-servlet-impl) shouldn't be too difficult, especially 
> for you ;-)
> 
> But as said in my other response to Carsten's mail, adding it to the 
> OSGi framework (Equinox and/or Felix) will be more difficult.

I haven't evaluated all the details, but IMHO the difficulty of adding 
dynamic classloading in OSGi depends on what you what to achieve. In 
OSGi classes in the main classloader of a bundle are imported, exported 
or internal. For classes that a bundle export dynamic class loading is 
more complicated as all bundles that import the class must be refreeshed 
when the class is updated.

But dynamic classloading in Cocoon has always been about isolated, e.g. 
sitemap local class loading. As long as we are happy with bundle 
internal classloading, it shouldn't be much different from the sitemap 
local dynamic classloading of today.

For inter bundle (block) dependencies, you can always stop, update, and 
restart a bundle and refresh the OSGi framework, and the application 
will work again with the new code (given that all services are dynamic 
aware).

> If you 
> have some time, it would be really great if you could have a look at it. 
> IMO the ReloadingClassloader is one of the most important features that 
> we should add (developing [web]apps without it, isn't fun anymore for me).

It should also be noted that Eclipse is based on OSGi and is rather 
dynamic :) So it should be possible to achieve a high degree of dynamism 
in OSGi based Cocoon, and we can possibly reuse some Eclipse bundles for 
convenient application development.

/Daniel

Mime
View raw message