remm        2003/10/17 07:42:51

  Modified:    catalina/src/share/org/apache/catalina/startup
                        SetAllPropertiesRule.java
  Log:
  - Add system property replacement to this (which will apply to the connector),
    as an experiment.
  - The best would be to add a souped up version of this to the digester, as
    well as add some get/setProperty on the container interface. The only problem
    is that it can't be saved back to XML (since the stuff needs to be transparently
    replaced). I'll post a "proposal" about that.
  
  Revision  Changes    Path
  1.2       +16 -3     
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/SetAllPropertiesRule.java
  
  Index: SetAllPropertiesRule.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/SetAllPropertiesRule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SetAllPropertiesRule.java 28 Jul 2003 11:14:48 -0000      1.1
  +++ SetAllPropertiesRule.java 17 Oct 2003 14:42:51 -0000      1.2
  @@ -99,9 +99,22 @@
                   name = attributes.getQName(i);
               }
               String value = attributes.getValue(i);
  +            value = IntrospectionUtils.replaceProperties
  +                (value, new SystemPropertyPropertyResource());
               IntrospectionUtils.setProperty(digester.peek(), name, value);
           }
   
  +    }
  +
  +
  +    // ----------------------------- SystemPropertyPropertyResource Inner Class
  +
  +
  +    protected class SystemPropertyPropertyResource
  +        implements IntrospectionUtils.PropertySource {
  +        public String getProperty(String key) {
  +            return System.getProperty(key);
  +        }
       }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to