jvanzyl     01/07/24 18:04:53

  Modified:    src/java/org/apache/turbine Turbine.java
  Log:
  - allow the setting of system properties.
  
  Revision  Changes    Path
  1.78      +16 -4     jakarta-turbine/src/java/org/apache/turbine/Turbine.java
  
  Index: Turbine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/Turbine.java,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- Turbine.java      2001/07/20 21:32:47     1.77
  +++ Turbine.java      2001/07/25 01:04:53     1.78
  @@ -108,7 +108,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Frank Y. Kim</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Rafal Krzewski</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  - * @version $Id: Turbine.java,v 1.77 2001/07/20 21:32:47 jon Exp $
  + * @version $Id: Turbine.java,v 1.78 2001/07/25 01:04:53 jvanzyl Exp $
    */
   public class Turbine
       extends HttpServlet
  @@ -566,8 +566,8 @@
           Configuration moduleTypes = configuration.subset("module.default");
           if (moduleTypes == null)
           {
  -            throw new TurbineException
  -                ("module.default subset is missing from TR.props");
  +            throw new TurbineException(
  +                "module.default subset is missing from TR.props");
           }
   
           Iterator j = moduleTypes.getKeys();
  @@ -604,7 +604,19 @@
           {
               moduleLoader.addModulePackage((String) i.next());
           }
  -
  +        
  +        // Set some system properties
  +        Configuration systemProperties = configuration.subset("system");
  +        Iterator k = systemProperties.getKeys();
  +
  +        while (k.hasNext())
  +        {
  +            String name = (String) k.next();
  +            String value = systemProperties.getString(name);
  +            Log.debug("[Turbine] System Property: " + name + " => " + value);
  +            System.getProperties().setProperty(name, value);
  +        }
  +        
           // Setup the default pipeline. There will be a pipeline
           // per (sub)app, just like there will be a module loader
           // per app, but we'll set a standard one up here for
  
  
  

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

Reply via email to