cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Gianni <>
Subject Re: [2.2] Setting up Cocoon and reloading
Date Mon, 03 Jul 2006 15:05:33 GMT
+1 for forgetting about it. Containers should provide a way to reload a
context, not servlets inside it. Also while developing with jetty the
advantage of having this feature compared to a complete jetty restart is
just a few seconds.

Anyway this will somehow probably return on 3.0 where the osgi core
bundle can be activated and deactivated, right Daniel?


Carsten Ziegeler wrote:

>Daniel and I changed the way how Cocoon is setup in 2.2 in the last
>week. Instead of doing everything in a single servlet, we now setup a
>Cocoon Spring BeanFactory in a servlet listener. This bean factory is
>stored as an attribute in the servlet context and can be retrieved by
>any servlet component.
>In addition we have a simple servlet now, which gets the container from
>the attribute, gets the root tree processor from the container and
>starts processing the request.
>This is a very simple setup that should give us more flexibility in the
>The new approach provides all features the old CocoonServlet had with
>one exception: reloading of the core. In Cocoon 2.1.x you can reload the
>core by providing the "?cocoon-reload=true" parameter and if reloading
>is turned on, the whole Cocoon instance is reloaded.
>Now, the question is if we still need this feature. I started to add a
>servlet filter for just reloading but then ran into some problems: for
>reloading we need to setup a new bean factory and disregard the old
>instance. First this has the same problem as we have with 2.1.x. What
>happens if older requests are still processed? - We can neglect this as
>this is a development only feature anyway.
>But more interesting is, what happens with all the servlets, listeners
>and filters out there who have a reference to the old container? We
>could solve this by a facade if we want.
>And another problem: this will setup a new cocoon instance, but a
>possible root Spring context is not reloaded anyway.
>So, due to all these problems I would suggest that we simply forget
>about this feature. This can be handled by reloading the whole webapp
>context through the application server which then really reloads
>everything and takes care of old processes (in one way or the other).
>Please note that this of course does not affect sitemap reloading which
>still works without any problems.
Simone Gianni

View raw message