cziegeler 02/04/05 03:58:09
Modified: src/java/org/apache/cocoon/transformation
TraxTransformer.java
src/webapp/WEB-INF cocoon.xconf
Log:
Try for fixing the hanging threads in Xalan - Can someone try this out?
Revision Changes Path
1.21 +19 -1
xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java
Index: TraxTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- TraxTransformer.java 20 Mar 2002 05:15:04 -0000 1.20
+++ TraxTransformer.java 5 Apr 2002 11:58:09 -0000 1.21
@@ -155,7 +155,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ovidiu Predescu</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Mark H. Butler</a>
- * @version CVS $Id: TraxTransformer.java,v 1.20 2002/03/20 05:15:04 vgritsenko Exp
$
+ * @version CVS $Id: TraxTransformer.java,v 1.21 2002/04/05 11:58:09 cziegeler Exp $
*/
public class TraxTransformer extends AbstractTransformer
implements Transformer, Composable, Configurable, Cacheable, Disposable {
@@ -198,6 +198,9 @@
/** The XSLTProcessor */
private XSLTProcessor xsltProcessor;
+ /** Did we finish the processing (is endDocument() called) */
+ private boolean finishedDocument = false;
+
/**
* Configure this transformer.
*/
@@ -548,6 +551,12 @@
this.inputSource = null;
}
this.par = null;
+ if (this.finishedDocument == false) {
+ try {
+ super.endDocument();
+ } catch (Exception ignore) {}
+ }
+ this.finishedDocument = false;
super.recycle();
}
@@ -564,5 +573,14 @@
} catch (Exception any) {
this.getLogger().error("Error in TraxTransformer.comment.", any);
}
+ }
+
+ /**
+ * Fix for stopping hanging threads of Xalan
+ */
+ public void endDocument()
+ throws SAXException {
+ super.endDocument();
+ this.finishedDocument = true;
}
}
1.4 +1 -1 xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf
Index: cocoon.xconf
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cocoon.xconf 29 Mar 2002 17:55:19 -0000 1.3
+++ cocoon.xconf 5 Apr 2002 11:58:09 -0000 1.4
@@ -136,7 +136,7 @@
<xslt-processor class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
logger="core.xslt-processor">
<parameter name="use-store" value="true"/>
- <parameter name="incremental-processing" value="false"/>
+ <parameter name="incremental-processing" value="true"/>
</xslt-processor>
<!-- Xpath Processor:
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]