greenrd 01/03/08 03:04:09
Modified: . changes.xml
src/org/apache/cocoon/producer ProducerFromFile.java
src/org/apache/cocoon/processor/xinclude
XIncludeProcessor.java
Log:
fixed caching memory consumption bugs in ProducerFromFile and
XIncludeProcessor
Revision Changes Path
1.218 +6 -1 xml-cocoon/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/xml-cocoon/changes.xml,v
retrieving revision 1.217
retrieving revision 1.218
diff -u -r1.217 -r1.218
--- changes.xml 2001/03/08 10:52:39 1.217
+++ changes.xml 2001/03/08 11:04:07 1.218
@@ -4,7 +4,7 @@
<!--
History of Cocoon changes
- $Id: changes.xml,v 1.217 2001/03/08 10:52:39 greenrd Exp $
+ $Id: changes.xml,v 1.218 2001/03/08 11:04:07 greenrd Exp $
-->
<changes title="History of Changes">
@@ -18,6 +18,11 @@
</devs>
<release version="@version@" date="@date@">
+ <action dev="RDG" type="fix">
+ Caching memory wastage fixes for XIncludeProcessor and ProducerFromFile
(identical to the XSLTProcessor
+ bug fix in a previous version). These bugs could theoretically have
caused OutOfMemoryErrors, so
+ upgrading is strongly recommended!
+ </action>
<action dev="RDG" type="update" due-to="Phillipe Lavoie"
due-to-email="[EMAIL PROTECTED]">
Upgraded Ant from version 1.1 to version 1.3 and rewrote build.xml to use
new syntax.
1.11 +4 -4
xml-cocoon/src/org/apache/cocoon/producer/ProducerFromFile.java
Index: ProducerFromFile.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/producer/ProducerFromFile.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ProducerFromFile.java 2000/11/20 01:43:59 1.10
+++ ProducerFromFile.java 2001/03/08 11:04:07 1.11
@@ -1,4 +1,4 @@
-/*-- $Id: ProducerFromFile.java,v 1.10 2000/11/20 01:43:59 greenrd Exp $ --
+/*-- $Id: ProducerFromFile.java,v 1.11 2001/03/08 11:04:07 greenrd Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -65,7 +65,7 @@
* based on its tranlated path.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version $Revision: 1.10 $ $Date: 2000/11/20 01:43:59 $
+ * @version $Revision: 1.11 $ $Date: 2001/03/08 11:04:07 $
*/
public class ProducerFromFile extends AbstractProducer implements Status,
Cacheable {
@@ -74,7 +74,7 @@
public Document getDocument(HttpServletRequest request) throws Exception
{
String file = Utils.getBasename(request, this.context);
- this.monitor.watch(Utils.encode(request), new File(file));
+ this.monitor.watch(Utils.encode(request, false, false), new
File(file));
return parser.parse(new InputSource(file));
}
@@ -87,7 +87,7 @@
}
public boolean hasChanged(Object context) {
- return this.monitor.hasChanged(Utils.encode((HttpServletRequest)
context));
+ return this.monitor.hasChanged(Utils.encode((HttpServletRequest)
context, false, false));
}
public boolean isCacheable(HttpServletRequest request) {
1.22 +3 -3
xml-cocoon/src/org/apache/cocoon/processor/xinclude/XIncludeProcessor.java
Index: XIncludeProcessor.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xinclude/XIncludeProcessor.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- XIncludeProcessor.java 2001/02/16 19:57:24 1.21
+++ XIncludeProcessor.java 2001/03/08 11:04:08 1.22
@@ -102,7 +102,7 @@
* a terrible wasteful of memory.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Donald Ball</a>
- * @version CVS $Revision: 1.21 $ $Date: 2001/02/16 19:57:24 $ $Author:
greenrd $
+ * @version CVS $Revision: 1.22 $ $Date: 2001/03/08 11:04:08 $ $Author:
greenrd $
*/
public class XIncludeProcessor extends AbstractActor implements Processor,
Status, Cacheable {
@@ -148,7 +148,7 @@
/** I would have thought that the monitor would return false if
the
key has no resources being monitored, but it doesn't. I
think
that might should change, but we'll work around it for now.
**/
- Object key = Utils.encode((HttpServletRequest)object);
+ Object key = Utils.encode((HttpServletRequest)object, false,
false);
if (monitored_table.containsKey(key)) {
return monitor.hasChanged(key);
}
@@ -212,7 +212,7 @@
debug = processor.debug;
this.document = document;
request = (HttpServletRequest)parameters.get("request");
- monitor_key = Utils.encode(request);
+ monitor_key = Utils.encode(request, false, false);
String basepath = Utils.getBasepath(request,context);
current_xmlbase = new File(basepath);
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]