joerg 2004/05/05 14:39:29
Modified: src/blocks/jsp/java/org/apache/cocoon/generation JSPGenerator.java . status.xml Log: unfortunately a caching JSPGenerator was a fast shot in the wrong direction, the caching should be content or event based or ask the servlet for "valid or not valid" (see also http://marc.theaimsgroup.com/?t=108326126000002&r=1&w=4 and http://marc.theaimsgroup.com/?t=108356987900002&r=1&w=4) Revision Changes Path 1.6 +6 -3 cocoon-2.1/src/blocks/jsp/java/org/apache/cocoon/generation/JSPGenerator.java Index: JSPGenerator.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/jsp/java/org/apache/cocoon/generation/JSPGenerator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- JSPGenerator.java 1 May 2004 00:49:29 -0000 1.5 +++ JSPGenerator.java 5 May 2004 21:39:28 -0000 1.6 @@ -37,7 +37,7 @@ * @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a> * @version CVS $Id$ */ -public class JSPGenerator extends FileGenerator { +public class JSPGenerator extends ServiceableGenerator { /** * Generate XML data from JSPEngine output. @@ -58,11 +58,13 @@ JSPEngine engine = null; SAXParser parser = null; + Source inputSource = null; Source contextSource = null; try { + inputSource = this.resolver.resolveURI(this.source); contextSource = this.resolver.resolveURI("context:/"); - String inputSourceURI = this.inputSource.getURI(); + String inputSourceURI = inputSource.getURI(); String contextSourceURI = contextSource.getURI(); if (!inputSourceURI.startsWith(contextSourceURI)) { @@ -102,6 +104,7 @@ } finally { super.manager.release(parser); super.manager.release(engine); + this.resolver.release(inputSource); this.resolver.release(contextSource); } } 1.312 +1 -4 cocoon-2.1/status.xml Index: status.xml =================================================================== RCS file: /home/cvs/cocoon-2.1/status.xml,v retrieving revision 1.311 retrieving revision 1.312 diff -u -r1.311 -r1.312 --- status.xml 4 May 2004 17:27:20 -0000 1.311 +++ status.xml 5 May 2004 21:39:28 -0000 1.312 @@ -216,9 +216,6 @@ Supersonic block added: the Supersonic Tour of Apache Cocoon. Tutorial/example app focused on the Power Trio: Pipelines, Flow, Forms. </action> - <action dev="JH" type="update"> - Made JSPGenerator cacheable by simply extending the FileGenerator. - </action> <action dev="DC" type="fix" due-to="Ralph Goers" fixes-bug="27878"> XMLResourceBundleFactory was stopping when it encountered the first bundle name that does not have a locale, missing those that might be