Use a safe default of the useEquals, works on any VM.
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 13 Nov 2009 20:12:32 +0000 (20:12 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 13 Nov 2009 20:12:32 +0000 (20:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@835974 13f79535-47bb-0310-9956-ffa450edef68

modules/jdbc-pool/doc/jdbc-pool.xml
modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java
modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java

index 8c76a9a..c692de9 100644 (file)
     </attribute>
 
     <attribute name="useEquals" required="false">
-      <p>(boolean) Set to true if you wish the <code>ProxyConnection</code> class to use <code>String.equals</code> instead of 
-         <code>==</code> when comparing method names. This property does not apply to added interceptors as those are configured individually.
-         The default value is <code>false</code>.
+      <p>(boolean) Set to true if you wish the <code>ProxyConnection</code> class to use <code>String.equals</code> and set to <code>false</code>
+         when you wish to use <code>==</code> when comparing method names. This property does not apply to added interceptors as those are configured individually.
+         The default value is <code>true</code>.
       </p> 
     </attribute>    
   </attributes>  
     <p>Abstract base class for all interceptors, can not be instantiated.</p>
     <attributes>
       <attribute name="useEquals" required="false">
-        <p>(String as boolean) Set to true if you wish the interceptor class to use <code>String.equals</code> instead of 
-         <code>==</code> when comparing method names. This property does not apply to added interceptors as those are configured individually.
-         The default value is <code>false</code>.
+        <p>(boolean) Set to true if you wish the <code>ProxyConnection</code> class to use <code>String.equals</code> and set to <code>false</code>
+         when you wish to use <code>==</code> when comparing method names.
+         The default value is <code>true</code>.
         </p>
       </attribute>
     </attributes>  
index 78a214a..71311bf 100644 (file)
@@ -65,7 +65,7 @@ public abstract class JdbcInterceptor implements InvocationHandler {
     /**
      * Property that decides how we do string comparison, default is reference (==)
      */
-    private boolean useEquals = false;
+    private boolean useEquals = true;
 
     /**
      * Public constructor for instantation through reflection
index 6fad3a3..0f56617 100644 (file)
@@ -69,7 +69,7 @@ public class PoolProperties implements PoolConfiguration {
     protected boolean testOnConnect =false;
     protected String jdbcInterceptors=null;
     protected boolean fairQueue = true;
-    protected boolean useEquals = false;
+    protected boolean useEquals = true;
     protected int abandonWhenPercentageFull = 0;
     protected long maxAge = 0;
     protected boolean useLock = false;