costin 02/04/10 13:43:41
Modified: jk/java/org/apache/jk/server JkCoyoteHandler.java
JkMain.java
Log:
Few tweaks, pass attributes to jk components, etc.
Revision Changes Path
1.9 +12 -7
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java
Index: JkCoyoteHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- JkCoyoteHandler.java 9 Apr 2002 20:51:06 -0000 1.8
+++ JkCoyoteHandler.java 10 Apr 2002 20:43:41 -0000 1.9
@@ -97,6 +97,8 @@
*/
public void setAttribute( String name, Object value ) {
log.info("setAttribute " + name + " " + value );
+ if( value instanceof String )
+ jkMain.setProperty( name, (String)value );
}
public Object getAttribute( String name ) {
@@ -260,13 +262,11 @@
msg.appendBytes( hV );
}
ep.getChannel().send( msg, ep );
- }
- if( actionCode==ActionCode.ACTION_RESET ) {
+ } else if( actionCode==ActionCode.ACTION_RESET ) {
if( log.isInfoEnabled() )
log.info("RESET " );
- }
- if( actionCode==ActionCode.ACTION_CLOSE ) {
+ } else if( actionCode==ActionCode.ACTION_CLOSE ) {
if( log.isInfoEnabled() )
log.info("CLOSE " );
org.apache.coyote.Response res=(org.apache.coyote.Response)param;
@@ -278,11 +278,16 @@
msg.appendInt( 1 );
ep.getChannel().send(msg, ep );
- }
- if( actionCode==ActionCode.ACTION_ACK ) {
+ } else if( actionCode==ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) {
+
+
+ } else if( actionCode==ActionCode.ACTION_REQ_HOST_ATTRIBUTE ) {
+
+
+ } else if( actionCode==ActionCode.ACTION_ACK ) {
if( log.isInfoEnabled() )
log.info("ACK " );
-
+ // What should we do here ? Who calls it ?
}
} catch( Exception ex ) {
log.error( "Error in action code ", ex );
1.13 +3 -5
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java
Index: JkMain.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- JkMain.java 20 Feb 2002 23:43:43 -0000 1.12
+++ JkMain.java 10 Apr 2002 20:43:41 -0000 1.13
@@ -70,10 +70,9 @@
import org.apache.tomcat.util.http.*;
import org.apache.tomcat.util.IntrospectionUtils;
-/** Main class used for testing jk core and common code and tunning.
+/** Main class used to startup jk.
*
- * It'll just start/init jk and use a dummy endpoint ( i.e. no servlet
- * container ).
+ * It is also useable standalone for testing or as a minimal socket server.
*/
public class JkMain
{
@@ -137,6 +136,7 @@
String home=wEnv.getJkHome();
if( home==null ) {
// XXX use IntrospectionUtil to find myself
+ jkMain.guessHome();
}
if( home != null ) {
File hF=new File(home);
@@ -252,8 +252,6 @@
IntrospectionUtils.processArgs( jkMain, args, new String[] {},
null, new Hashtable());
- jkMain.guessHome();
-
jkMain.init();
jkMain.start();
} catch( Exception ex ) {
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>