jmcnally    01/11/12 17:10:27

  Modified:    src/java/org/apache/torque Torque.java
  Log:
  the service will pass torque a configuration including only the relevant properties. 
 And the prefixes will already be removed.
  
  Revision  Changes    Path
  1.39      +10 -3     jakarta-turbine-torque/src/java/org/apache/torque/Torque.java
  
  Index: Torque.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/Torque.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- Torque.java       2001/11/11 17:14:20     1.38
  +++ Torque.java       2001/11/13 01:10:27     1.39
  @@ -81,7 +81,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Magn�s ��r Torfason</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Rafal Krzewski</a>
  - * @version $Id: Torque.java,v 1.38 2001/11/11 17:14:20 jvanzyl Exp $
  + * @version $Id: Torque.java,v 1.39 2001/11/13 01:10:27 jmcnally Exp $
    */
   public class Torque
   {
  @@ -150,14 +150,21 @@
           // configuration consist only of the remain torque specific
           // properties that are contained in the configuration. First 
           // look for properties that are in the "torque" namespace.
  +        ExtendedProperties originalConf = configuration;
           configuration = configuration.subset("torque");
           
  -        if (configuration.isEmpty())
  +        if (configuration == null || configuration.isEmpty())
           {
               // If there are no properties in the "torque" namespace
               // than try the "services.DatabaseService" namespace. This
               // will soon be deprecated.
  -            configuration = configuration.subset("services.DatabaseService");
  +            configuration = originalConf.subset("services.DatabaseService");
  +
  +            // the configuration may already have any prefixes stripped
  +            if (configuration == null || configuration.isEmpty())
  +            {
  +                configuration = originalConf;
  +            }            
           }
   
           dbMaps = new HashMap();
  
  
  

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

Reply via email to