Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 14005 invoked from network); 1 Nov 2006 23:20:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2006 23:20:25 -0000 Received: (qmail 58034 invoked by uid 500); 1 Nov 2006 23:20:30 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 57963 invoked by uid 500); 1 Nov 2006 23:20:30 -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 57946 invoked by uid 99); 1 Nov 2006 23:20:30 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2006 15:20:30 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2006 15:20:17 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 47B897142F6 for ; Wed, 1 Nov 2006 15:19:57 -0800 (PST) Message-ID: <21212410.1162423197291.JavaMail.root@brutus> Date: Wed, 1 Nov 2006 15:19:57 -0800 (PST) From: "Simone Gianni (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Commented: (COCOON-1929) [PATCH] Reloading classloader in Cocoon 2.2 In-Reply-To: <4146223.1160158044580.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/COCOON-1929?page=comments#action_12446402 ] Simone Gianni commented on COCOON-1929: --------------------------------------- Tested file cocoon-core-r469213.diff, seems to work correctly. > [PATCH] Reloading classloader in Cocoon 2.2 > ------------------------------------------- > > Key: COCOON-1929 > URL: http://issues.apache.org/jira/browse/COCOON-1929 > Project: Cocoon > Issue Type: Task > Components: * Cocoon Core > Affects Versions: 2.2-dev (Current SVN) > Reporter: Maurizio Pillitu > Attachments: cocoon-core-r469213.diff, cocoon-r469167.diff, cocoon.diff > > > The attached patch provides a first implementation to enable reloading classloader configuration into the sitemap, using the sitemap syntax used in blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap. > Referring to CocoonGT 2005 Torsten's code, I moved all the JCI listener configuration into the ReloadingClassLoaderFactory class, that is in charge to parse the classloader configuration (filled by AvalonUtils class) and instanciate all the JCI listeners. > The TreeProcessor component is subscribed to the JCI listeners, in order to reload the component definitions when a file change event is triggered. > The patch provides also a sample : http://localhost:8888/blocks/cocoon-core-main-sample/reloading/ > Try to change MyGenerator.java and compile it into blocks/cocoon-core-sample/cocoon-core-main-sample/target/classes (default eclipse location); if you need to change the location of the .class folder, edit the cocoon-core-main-sample sitemap.xmap. > core. > Obviously there are many parts of the code that can be optimized. > The patch has been applied on revision 453682. > NOTE! > 1. I decided to provide the reloading class functionality only for dev mode, so, in order to get it working, you need to run the cocoon application with -Dorg.apache.cocoon.mode=dev > 2. The patch depends on a bugfix on Commons JCI (https://issues.apache.org/jira/browse/SANDBOX-174), so it's necessary to build jci-core from trunk; the patch will update the cocoon-bootstrap dependency to jci. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira