cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/compat Action.java Jdk11Compat.java Jdk12Support.java SimpleClassLoader.java

2001-05-02 Thread costin

costin  01/05/02 10:47:58

  Added:   src/share/org/apache/tomcat/util/compat Tag: tomcat_32
Action.java Jdk11Compat.java Jdk12Support.java
SimpleClassLoader.java
  Log:
  Adding the JDK compat package from 3.3.
  
  This provide an clean mechanism to support JDK1.1, while taking advantage
  of later JVMs without the pain of reflection or other hacks.
  
  ( it is not specific to JDK1.1 - it can provide JDK1.4 services while keeping
  compat with JDK1.2, etc )
  
  Adding this code shouldn't affect any piece of tomcat3.2 ( except the classes
  that will use it )
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +0 -0  
jakarta-tomcat/src/share/org/apache/tomcat/util/compat/Action.java
  
  Index: Action.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/compat/Action.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  1.4.2.1   +0 -0  
jakarta-tomcat/src/share/org/apache/tomcat/util/compat/Jdk11Compat.java
  
  Index: Jdk11Compat.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/compat/Jdk11Compat.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  
  
  
  1.2.2.1   +0 -0  
jakarta-tomcat/src/share/org/apache/tomcat/util/compat/Jdk12Support.java
  
  Index: Jdk12Support.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/compat/Jdk12Support.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  
  
  
  1.3.2.1   +0 -0  
jakarta-tomcat/src/share/org/apache/tomcat/util/compat/SimpleClassLoader.java
  
  Index: SimpleClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/compat/SimpleClassLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/compat Action.java Jdk11Compat.java Jdk12Support.java

2001-01-24 Thread costin

costin  01/01/24 21:07:40

  Modified:.build.xml
   src/etc  server.xml tomcat.policy
   src/facade22/org/apache/tomcat/facade
RequestDispatcherImpl.java
   src/share/org/apache/tomcat/core BaseInterceptor.java
   src/share/org/apache/tomcat/modules/config
LoaderInterceptor11.java PolicyInterceptor.java
ServerXmlInterceptor.java
   src/share/org/apache/tomcat/modules/generators
Jdk12Interceptor.java
   src/share/org/apache/tomcat/modules/session
SimpleSessionStore.java
  Added:   src/share/org/apache/tomcat/modules/config PolicyLoader.java
   src/share/org/apache/tomcat/util/compat Action.java
Jdk11Compat.java Jdk12Support.java
  Log:
  Fixes and changes for JDK1.1 support.
  
  The build on 1.1 was broken for few weeks, and I hope this solution
  will improve the things a bit (in addition, I'll check the nightly 1.1
  build until we're done ).
  
  The util.compat package contains a helper that will avoid the use of
  introspection or other (complex) solutions to maintain 1.1 compatibility.
  
  It's just a small wrapper around common methods, with 2 implementations -
  one for jdk1.1 ( doing nothing for doPriviledged, returning SimpleClassLoader,
  etc) and one for jdk1.2+ ( wrapping and performing PriviledgedAction,
  returning the URLClassLoader, etc).
  
  As a result:
  - LoaderInterceptor12 is no longer needed
  - LoaderInterceptor11 will automatically use URLClassLoader if in Java2
  environment, no need to edit server.xml for that
  - Jdk12Interceptor compiles and can be loaded in jdk1.1. It'll do
  java2 tasks if java2 is detected ( there is another trick to add it only
  if needed - see next )
  - and of course, it builds and work fine on JDK1.1 ( again )
  
  As a related change, PolicyInterceptor will be automatically
  loaded if Java2 is detected and a security manager is set (or a
  secure option is set on the contextmanager ). To do that we use
  PolicyLoader, that detect the conditions where we want sandboxing
  and if java2 is available and loads the "real" policy interceptor.
  
  That simplifies a lot the configuration, we no longer need to explain
  how to change the config just to run JNDI in java2 environment.
  
  I also added the permissions needed to run /admin in a sandbox, there
  are few tests that are failing in sandbox - I'm working on a fix
  ( but probably next week, I have a deadline for monday )
  
  Also, added a small comment ( to be expanded ) in BaseInterceptor.
  
  Revision  ChangesPath
  1.106 +3 -1  jakarta-tomcat/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/build.xml,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- build.xml 2001/01/22 16:42:00 1.105
  +++ build.xml 2001/01/25 05:07:32 1.106
  @@ -107,6 +107,7 @@
 !-- no dependencies --
 include name="org/apache/tomcat/util/**"/
 exclude name="**/util/net/SSLSocketFactory.java" unless="jsse.present"/
  +  exclude name="**/util/compat/Jdk12Support.java" unless="jdk12.present"/
   /javac
   jar jarfile="${tomcat.build}/lib/tomcat_util.jar" 
 basedir="${tomcat.build}/classes" 
  @@ -238,9 +239,10 @@
pathelement location="${tomcat.build}/lib/tomcat_core.jar"/
 /classpath
 include name="org/apache/tomcat/modules/**"/
  -  exclude 
  +  !-- exclude 
 name="org/apache/tomcat/modules/generators/Jdk12Interceptor.java" 
  unless="jdk12.present"/
  +   --
 exclude 
  name="org/apache/tomcat/modules/config/LoaderInterceptor12.java" 
 unless="jdk12.present"/
  
  
  
  1.60  +6 -3  jakarta-tomcat/src/etc/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- server.xml2001/01/01 02:07:23 1.59
  +++ server.xml2001/01/25 05:07:33 1.60
  @@ -112,6 +112,9 @@
   ContextInterceptor 
   className="org.apache.tomcat.facade.WebXmlReader" /
   
  +ContextInterceptor 
  +className="org.apache.tomcat.modules.config.PolicyLoader" /
  +
   !-- Uncomment out if you have JDK1.2 and want to implement
 the Java SecurityManager
   ContextInterceptor 
  @@ -149,11 +152,11 @@
   className="org.apache.tomcat.modules.mappers.SimpleMapper1" 
   debug="0" /
   
  -!-- fix the context class loader, other JDK1.2 specific code
  +!-- fix the context class loader, other JDK1.2 specific code --