cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40 JkConfig40.java JkConnector.java JkRequest40.java JkResponse40.java LocalStrings.properties Worker40.java

2002-04-09 Thread costin

costin  02/04/09 13:17:47

  Removed: jk/java/org/apache/jk/server/tomcat40 JkConfig40.java
JkConnector.java JkRequest40.java JkResponse40.java
LocalStrings.properties Worker40.java
  Log:
  Removed the duplicated tomcat4 connector. We'll use the coyote connector instead.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40 JkConfig40.java JkConnector.java JkRequest40.java JkResponse40.java Worker40.java

2002-02-06 Thread costin

costin  02/02/06 09:52:28

  Modified:jk/java/org/apache/jk/server/tomcat40 JkConfig40.java
JkConnector.java JkRequest40.java JkResponse40.java
Worker40.java
  Log:
  Updates for the 4.x adapter. It should work fine ( except config, that wasn't
  ported )
  
  Revision  ChangesPath
  1.2   +1 -1  
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkConfig40.java
  
  Index: JkConfig40.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkConfig40.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JkConfig40.java   12 Jan 2002 04:14:53 -  1.1
  +++ JkConfig40.java   6 Feb 2002 17:52:27 -   1.2
  @@ -303,7 +303,7 @@
return false;
   }
   
  -private static final int dL=10;
  +private static final int dL=0;
   private static void d(String s ) {
   System.err.println( "JkConfig40: " + s );
   }
  
  
  
  1.5   +2 -2  
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkConnector.java
  
  Index: JkConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkConnector.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JkConnector.java  26 Jan 2002 17:29:13 -  1.4
  +++ JkConnector.java  6 Feb 2002 17:52:27 -   1.5
  @@ -202,11 +202,11 @@
   ((ContainerBase)ct).addLifecycleListener(config);
   config.loadExisting( ct );
   
  -jkMain.setDefaultWorker( worker );
  +jkMain.getWorkerEnv().addHandler("container", worker );
   
   String catalinaHome=System.getProperty("catalina.home");
   File f=new File( catalinaHome );
  -File jkHomeF=new File( f, "webapps/jk" );
  +File jkHomeF=new File( f, "webapps/jk/WEB-INF" );
   
   d("Setting jkHome " + jkHomeF );
   jkMain.setJkHome( jkHomeF.getAbsolutePath() );
  
  
  
  1.3   +3 -48 
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkRequest40.java
  
  Index: JkRequest40.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkRequest40.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JkRequest40.java  26 Jan 2002 17:25:21 -  1.2
  +++ JkRequest40.java  6 Feb 2002 17:52:27 -   1.3
  @@ -78,6 +78,7 @@
   import org.apache.tomcat.util.http.MimeHeaders;
   
   import org.apache.jk.core.*;
  +import org.apache.jk.server.*;
   import org.apache.jk.common.*;
   import org.apache.jk.util.*;
   
  @@ -89,7 +90,7 @@
   
   private static int id = 1;
   Channel ch;
  -Endpoint ep;
  +MsgContext ep;
   
   public JkRequest40() {
   super();
  @@ -102,7 +103,7 @@
   response=res;
   }
   
  -public void setEndpoint( Channel ch, Endpoint ep ) {
  +public void setEndpoint( Channel ch, MsgContext ep ) {
   this.ch=ch;
   this.ep=ep;
   }
  @@ -258,50 +259,4 @@
   return getName();
   }
   
  -}
  -
  -class JkInputStream extends InputStream {
  -
  -JkInputStream() {
  -}
  -
  -public int available() throws IOException {
  -return 0;
  -}
  -
  -public void close() throws IOException {
  -}
  -
  -public void mark(int readLimit) {
  -}
  -
  -public boolean markSupported() {
  -return false;
  -}
  -
  -public void reset() throws IOException {
  -throw new IOException("reset() not supported");
  -}
  -
  -byte singleRead[]=new byte[1];
  -
  -public int read() throws IOException {
  -int rc=read( singleRead, 0, 1 );
  -if( rc== 1 )
  -return singleRead[0];
  -return -1;
  -}
  -
  -public int read(byte[] b, int off, int len) throws IOException {
  -return -1;// ajp13.doRead(b, off, len);
  -}
  -
  -public long skip(long n) throws IOException {
  -if (n > Integer.MAX_VALUE) {
  -throw new IOException("can't skip than many:  " + n);
  -}
  -// XXX if n is big, split this in multiple reads
  -byte[] b = new byte[(int)n];
  -return read(b, 0, b.length);
  -}
   }
  
  
  
  1.3   +2 -2  
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkResponse40.java
  
  Index: JkResponse40.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkResponse40.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JkResponse40.java 2

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40 JkConfig40.java

2002-01-11 Thread costin

costin  02/01/11 20:14:53

  Added:   jk/java/org/apache/jk/server/tomcat40 JkConfig40.java
  Log:
  Add an initial config code to extract webapps ( I don't think autoconf will
  happen very soon, but it's a small start ).
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat40/JkConfig40.java
  
  Index: JkConfig40.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:  
   *   "This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * .
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  package org.apache.jk.server.tomcat40;
  
  import org.apache.catalina.*;
  import java.io.*;
  
  import org.apache.jk.server.*;
  import org.apache.jk.core.*;
  
  
  /**
   * Extract config information out of tomcat4.x.
   *
   *   @author Bill Barker
   *   @author Costin Manolache
   *   @author Larry Isaacs
   */
  public class JkConfig40 implements LifecycleListener {
  
  JkMain jkMain;
  
  //  Tomcat callbacks 
  
  // Auto-config should be able to react to dynamic config changes,
  // and regenerate the config.
  
  /** Generate the configuration - only when the server is
   *  completely initialized ( before starting )
   */
  public void lifecycleEvent(LifecycleEvent evt)
  {
  d( "Event " + evt );
if(Lifecycle.START_EVENT.equals(evt.getType())) {
  
  Lifecycle who = evt.getLifecycle();
  if( who instanceof Server ) {
  executeServer((Server)who);
  } else if ( who instanceof Host ) {
  executeHost((Host)who);
  } else if( who instanceof Context ) {
  executeContext((Context)who);
  }
  }
  }
  
  public void loadExisting(Container ct) {
  d("loadExisting");
  while( !(ct instanceof Engine ) &&
 ct!=null ) {
  d("Ct==" + ct );
  ct=ct.getParent();
  }
  if( ct==null ) {
  d("Can't find the Server");
  return;
  }
  executeEngine( ( Engine)ct );
  }
  
  // Deal with the various 4.0 Containers. We care about the Con