Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 28629 invoked from network); 6 Oct 2003 16:42:41 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 6 Oct 2003 16:42:41 -0000 Received: (qmail 65268 invoked by uid 500); 6 Oct 2003 16:42:33 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 65210 invoked by uid 500); 6 Oct 2003 16:42:33 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 65199 invoked by uid 500); 6 Oct 2003 16:42:33 -0000 Delivered-To: apmail-cocoon-2.1-cvs@apache.org Received: (qmail 65189 invoked from network); 6 Oct 2003 16:42:32 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 6 Oct 2003 16:42:32 -0000 Received: (qmail 28565 invoked by uid 1318); 6 Oct 2003 16:42:39 -0000 Date: 6 Oct 2003 16:42:39 -0000 Message-ID: <20031006164239.28564.qmail@minotaur.apache.org> From: sylvain@apache.org To: cocoon-2.1-cvs@apache.org Subject: cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap MountNode.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N sylvain 2003/10/06 09:42:39 Modified: src/java/org/apache/cocoon/components/treeprocessor/sitemap MountNode.java Log: Fix bug# Revision Changes Path 1.7 +14 -6 cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/MountNode.java Index: MountNode.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/MountNode.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- MountNode.java 29 Sep 2003 21:06:39 -0000 1.6 +++ MountNode.java 6 Oct 2003 16:42:39 -0000 1.7 @@ -63,6 +63,8 @@ import org.apache.cocoon.components.treeprocessor.TreeProcessor; import org.apache.cocoon.components.treeprocessor.variables.VariableResolver; import org.apache.cocoon.environment.Environment; +import org.apache.excalibur.source.Source; +import org.apache.excalibur.source.SourceResolver; /** * @@ -106,7 +108,7 @@ Map objectModel = env.getObjectModel(); String resolvedSource = this.source.resolve(context, objectModel); - TreeProcessor processor = getProcessor(env, resolvedSource); + TreeProcessor processor = getProcessor(resolvedSource); String resolvedPrefix = this.prefix.resolve(context, objectModel); @@ -138,7 +140,7 @@ } } - private synchronized TreeProcessor getProcessor(Environment env, String source) throws Exception { + private synchronized TreeProcessor getProcessor(String source) throws Exception { TreeProcessor processor = (TreeProcessor)processors.get(source); @@ -150,9 +152,15 @@ } else { actualSource = source; } - - processor = this.parentProcessor.createChildProcessor( - this.manager, this.language, env.resolveURI(actualSource)); + + SourceResolver resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE); + Source src = resolver.resolveURI(actualSource); + try { + processor = this.parentProcessor.createChildProcessor(this.manager, this.language, src); + } finally { + resolver.release(src); + this.manager.release(resolver); + } // Associate to the original source processors.put(source, processor);