sboag 01/06/26 18:47:08
Modified: java/src/org/apache/xalan/transformer
TransformerHandlerImpl.java
Log:
If we are in a condition where the parser threw an exception,
we have to make sure that doMore doesn't call to wait on
the other thread, so in this case we first clear the parser
thread from the CoRoutine manager. If we don't do this, the
handler will hang if an exception occurs (once the CoRoutine
problem was fixed!).
Revision Changes Path
1.4 +13 -2
xml-xalan/java/src/org/apache/xalan/transformer/TransformerHandlerImpl.java
Index: TransformerHandlerImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TransformerHandlerImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TransformerHandlerImpl.java 2001/06/26 03:46:22 1.3
+++ TransformerHandlerImpl.java 2001/06/27 01:47:05 1.4
@@ -161,7 +161,18 @@
CoroutineSAXParser sp = (CoroutineSAXParser)m_contentHandler;
if(m_insideParse)
- sp.doMore(false, sax2dtm.getAppCoroutineID());
+ {
+ // %REVIEW% Joe needs to review this.
+ // If we are in a condition where the parser threw an exception,
+ // we have to make sure that doMore doesn't call to wait on
+ // the other thread, so in this case we first clear the parser
+ // thread from the CoRoutine manager.
+ if(null != ex)
+ {
+ sp.getCoroutineManager().co_exit(sp.getParserCoroutineID());
+ }
+ sp.doMore(false, sax2dtm.getAppCoroutineID());
+ }
}
sax2dtm.clearCoRoutine(true);
@@ -682,7 +693,7 @@
*/
public void fatalError(SAXParseException e) throws SAXException
{
-
+System.err.println("In fatalError!");
clearCoRoutine(e);
if (m_errorHandler != null)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]