Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 12953 invoked by uid 500); 21 Feb 2002 00:08:14 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 12944 invoked by uid 500); 21 Feb 2002 00:08:14 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 21 Feb 2002 00:08:13 -0000 Message-ID: <20020221000813.58607.qmail@icarus.apache.org> From: vgritsenko@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/java/org/apache/cocoon/sitemap Handler.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N vgritsenko 02/02/20 16:08:13 Modified: src/java/org/apache/cocoon/sitemap Handler.java Log: Unclutter [core] log category: feed sitemap with sitemap handler's logger instead of program generator's logger. Revision Changes Path 1.10 +11 -6 xml-cocoon2/src/java/org/apache/cocoon/sitemap/Handler.java Index: Handler.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/sitemap/Handler.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Handler.java 7 Feb 2002 04:37:42 -0000 1.9 +++ Handler.java 21 Feb 2002 00:08:13 -0000 1.10 @@ -89,7 +89,7 @@ * @author Carsten Ziegeler * @author Giacomo Pati * @author Stefano Mazzocchi - * @version CVS $Id: Handler.java,v 1.9 2002/02/07 04:37:42 vgritsenko Exp $ + * @version CVS $Id: Handler.java,v 1.10 2002/02/21 00:08:13 vgritsenko Exp $ */ public class Handler extends AbstractLoggable implements Runnable, Contextualizable, Composable, Processor, Disposable, SourceResolver { @@ -270,13 +270,19 @@ * XSLTFactoryLoader, since it is created by the Xalan engine. */ XSLTFactoryLoader.setLogger(getLogger()); + programGenerator = (ProgramGenerator)this.manager.lookup(ProgramGenerator.ROLE); smap = (Sitemap)programGenerator.load(this.manager, this.sourceFileName, markupLanguage, programmingLanguage, this); - if (this.sitemap != null) { - programGenerator.release((CompiledComponent)this.sitemap); + if (smap instanceof AbstractLoggable) { + ((AbstractLoggable)smap).setLogger(getLogger()); } + + // Swap old and new sitemaps + Sitemap oldSitemap = this.sitemap; this.sitemap = smap; + programGenerator.release((CompiledComponent)oldSitemap); + // add the source factory for the cocoon protocol this.sourceHandler.addFactory("cocoon", new CocoonSourceFactory(this.sitemap, this.sitemap.getComponentManager())); @@ -292,9 +298,8 @@ this.exception = (Exception)t; } } finally { - if (programGenerator != null) { - this.manager.release(programGenerator); - } + this.manager.release(programGenerator); + this.regeneration = null; this.isRegenerationRunning = false; this.contextSource.recycle(); ---------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-cvs-help@xml.apache.org