Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 20845 invoked from network); 3 Jul 2006 13:47:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Jul 2006 13:47:55 -0000 Received: (qmail 30794 invoked by uid 500); 3 Jul 2006 13:47:54 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 30346 invoked by uid 500); 3 Jul 2006 13:47:52 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 30335 invoked by uid 99); 3 Jul 2006 13:47:52 -0000 Received: from [209.237.227.194] (HELO [127.0.0.1]) (209.237.227.194) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jul 2006 06:47:52 -0700 Message-ID: <44A92014.9060005@apache.org> Date: Mon, 03 Jul 2006 15:48:04 +0200 From: Carsten Ziegeler User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Cocoon-Dev Subject: [2.2] Setting up Cocoon and reloading X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 future. 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. WDYT? Carsten -- Carsten Ziegeler - Open Source Group, S&N AG http://www.s-und-n.de http://www.osoco.org/weblogs/rael/