tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Catalina.java
Date Sat, 17 Nov 2001 08:26:06 GMT
remm        01/11/17 00:26:06

  Modified:    catalina/src/share/org/apache/catalina/startup Catalina.java
  Log:
  - Only set the initial context factory if it's not been set.
    Patch submitted by Han Ming Ong <hanming at chirpyfish.org>
  
  Revision  Changes    Path
  1.39      +11 -6     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java
  
  Index: Catalina.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- Catalina.java	2001/11/11 18:37:33	1.38
  +++ Catalina.java	2001/11/17 08:26:06	1.39
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
1.38 2001/11/11 18:37:33 remm Exp $
  - * $Revision: 1.38 $
  - * $Date: 2001/11/11 18:37:33 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
1.39 2001/11/17 08:26:06 remm Exp $
  + * $Revision: 1.39 $
  + * $Date: 2001/11/17 08:26:06 $
    *
    * ====================================================================
    *
  @@ -97,7 +97,7 @@
    * </u>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.38 $ $Date: 2001/11/11 18:37:33 $
  + * @version $Revision: 1.39 $ $Date: 2001/11/17 08:26:06 $
    */
   
   public class Catalina {
  @@ -460,8 +460,13 @@
                   value = value + ":" + oldValue;
               }
               System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, value);
  -            System.setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
  -                               "org.apache.naming.java.javaURLContextFactory");
  +            value = System.getProperty
  +                (javax.naming.Context.INITIAL_CONTEXT_FACTORY);
  +            if (value == null) {
  +                System.setProperty
  +                    (javax.naming.Context.INITIAL_CONTEXT_FACTORY,
  +                     "org.apache.naming.java.javaURLContextFactory");
  +            }
           }
   
           // If a SecurityManager is being used, set properties for
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message