You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/06/01 10:29:34 UTC
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelJni.java HandlerRequest.java JniHandler.java
costin 2002/06/01 01:29:34
Modified: jk/java/org/apache/jk/apr AprImpl.java
jk/java/org/apache/jk/common ChannelJni.java
HandlerRequest.java JniHandler.java
Log:
Minor fixes, deal with the new callback cases.
Things are a bit tricky, after we do a bit of refactoring on Coyote Action
I expect to simplify a lot the model.
The invoke() method is used in both ways, for calls from lower layers and
also from higher layers ( with dispatch by action code - but we have 2 kinds
of action codes, one is Coyote and the other is jk - the packet type ). This
can be easily simplified using hooks, with each layer defining its own hooks.
For now things are ok, I don't expect more complexity in the current code,
but the first thing after releases is dealing with ActionCode and creating
a unified hook mechanism.
Revision Changes Path
1.19 +1 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/apr/AprImpl.java
Index: AprImpl.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/apr/AprImpl.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- AprImpl.java 1 Jun 2002 02:50:11 -0000 1.18
+++ AprImpl.java 1 Jun 2002 08:29:34 -0000 1.19
@@ -206,7 +206,7 @@
*/
try {
System.out.println("Loading " + jniModeSo);
- System.load( jniModeSo );
+ if( jniModeSo!= null ) System.load( jniModeSo );
} catch( Throwable ex ) {
// ignore
ex.printStackTrace();
1.12 +2 -0 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java
Index: ChannelJni.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ChannelJni.java 28 May 2002 22:51:11 -0000 1.11
+++ ChannelJni.java 1 Jun 2002 08:29:34 -0000 1.12
@@ -160,6 +160,8 @@
return receive( msg, ep );
case JkHandler.HANDLE_SEND_PACKET:
return send( msg, ep );
+ case JkHandler.HANDLE_FLUSH:
+ return 0;
}
// Default is FORWARD - called from C
try {
1.14 +2 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java
Index: HandlerRequest.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- HandlerRequest.java 28 May 2002 22:51:11 -0000 1.13
+++ HandlerRequest.java 1 Jun 2002 08:29:34 -0000 1.14
@@ -388,7 +388,8 @@
return OK;
default:
- /*DEBUG*/ try {throw new Exception(); } catch(Exception ex) {ex.printStackTrace();}
+ System.err.println("Unknown message " + type );
+ msg.dump("Unknown message" );
}
return OK;
1.8 +4 -3 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JniHandler.java
Index: JniHandler.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JniHandler.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- JniHandler.java 1 Jun 2002 02:55:55 -0000 1.7
+++ JniHandler.java 1 Jun 2002 08:29:34 -0000 1.8
@@ -268,8 +268,9 @@
nativeJkHandlerP,
nativeContext,
code, msg.getBuffer(), 0, msg.getLen(), raw );
- if( status != 0 )
+ if( status != 0 && status != 2 ) {
log.error( "nativeDispatch: error " + status );
+ }
if( log.isDebugEnabled() ) log.debug( "Sending packet - done " + status);
return status;
@@ -292,10 +293,10 @@
apr.jkRecycle(xEnv, ep.getJniContext());
- if(log.isInfoEnabled() ) log.info("Shm invoke status " + status);
+ if(log.isInfoEnabled() ) log.info("Jni invoke status " + status);
apr.releaseJkEnv( xEnv );
- return 0;
+ return 0;
}
private static org.apache.commons.logging.Log log=
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>