mmanders 01/08/14 19:32:02
Modified: src/share/org/apache/tomcat/modules/server JNIEndpoint.java
Log:
Added necessary synchronization around notify calls and added a stacktrace on
exceptions from calls to processConnection.
Revision Changes Path
1.2 +12 -5
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/JNIEndpoint.java
Index: JNIEndpoint.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/JNIEndpoint.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JNIEndpoint.java 2000/09/17 06:37:53 1.1
+++ JNIEndpoint.java 2001/08/15 02:32:02 1.2
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/JNIEndpoint.java,v
1.1 2000/09/17 06:37:53 costin Exp $
- * $Revision: 1.1 $
- * $Date: 2000/09/17 06:37:53 $
+ * $Header:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/JNIEndpoint.java,v
1.2 2001/08/15 02:32:02 mmanders Exp $
+ * $Revision: 1.2 $
+ * $Date: 2001/08/15 02:32:02 $
*
* ====================================================================
*
@@ -95,13 +95,17 @@
// the handler is no longer useable
if( handler==null ) {
running=false;
- notify();
+ synchronized(this) {
+ notify();
+ }
return;
}
System.out.println("Running ...");
running=true;
- notify();
+ synchronized(this) {
+ notify();
+ }
}
// -------------------- JNI Entry points
@@ -156,6 +160,9 @@
return 1;
} catch(Throwable t) {
// Throwables are not allowed into the native code !!!
+ // print it out so that we can debug it later.
+ System.out.println("Caught throwable " + t);
+ t.printStackTrace();
}
}
return 0;