seade       2004/08/22 19:54:16

  Modified:    xdocs    Tag: TORQUE_3_1_BRANCH release-changes.xml
               src/java/org/apache/torque Tag: TORQUE_3_1_BRANCH
                        TorqueInstance.java
  Log:
  Use adapter in preference to driver when building the database map.
  Thanks to Ben Hogan for the patch.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.3.2.14  +9 -0      db-torque/xdocs/release-changes.xml
  
  Index: release-changes.xml
  ===================================================================
  RCS file: /home/cvs/db-torque/xdocs/release-changes.xml,v
  retrieving revision 1.3.2.13
  retrieving revision 1.3.2.14
  diff -u -r1.3.2.13 -r1.3.2.14
  --- release-changes.xml       23 Aug 2004 00:29:52 -0000      1.3.2.13
  +++ release-changes.xml       23 Aug 2004 02:54:15 -0000      1.3.2.14
  @@ -18,6 +18,15 @@
   <p>
     <ul>
       <li>
  +      The <code>adapter</code> property is now used in preference to 
  +      <code>driver</code> when building the database map.  This allows Torque
  +      to work when the driver setting is not what it expects - e.g. if using 
  +      <code>com.mysql</code> driver instead of the 
  +      <code>org.gjt.mm.mysql</code> or when using 
  +      <a http="http://www.p6spy.org/";>P6Spy</a> pass through driver for 
  +      performance monitoring.  Thanks to Ben Hogan for the patch.
  +    </li>
  +    <li>
         DB2 limit and offset support.  Thanks to Augustin Vidovic for the patch.
       </li>
       <li>
  
  
  
  No                   revision
  No                   revision
  1.5.2.5   +5 -4      db-torque/src/java/org/apache/torque/TorqueInstance.java
  
  Index: TorqueInstance.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/java/org/apache/torque/TorqueInstance.java,v
  retrieving revision 1.5.2.4
  retrieving revision 1.5.2.5
  diff -u -r1.5.2.4 -r1.5.2.5
  --- TorqueInstance.java       23 Aug 2004 02:21:39 -0000      1.5.2.4
  +++ TorqueInstance.java       23 Aug 2004 02:54:16 -0000      1.5.2.5
  @@ -29,6 +29,7 @@
   import org.apache.commons.configuration.ConfigurationException;
   import org.apache.commons.configuration.PropertiesConfiguration;
   
  +import org.apache.commons.lang.StringUtils;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  @@ -600,10 +601,10 @@
           // Setup other ID generators for this map.
           try
           {
  -            String key = getDatabaseProperty(name, "driver");
  -            if (key == null || key.length() == 0)
  +            String key = getDatabaseProperty(name, "adapter");
  +            if (StringUtils.isEmpty(key))
               {
  -                key = getDatabaseProperty(name, "adapter");
  +                key = getDatabaseProperty(name, "driver");
               }
               DB db = DBFactory.create(key);
               for (int i = 0; i < IDGeneratorFactory.ID_GENERATOR_METHODS.length;
  
  
  

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

Reply via email to