svn commit: r1342310 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1342310 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java

jacopoc
Author: jacopoc
Date: Thu May 24 16:12:05 2012
New Revision: 1342310

URL: http://svn.apache.org/viewvc?rev=1342310&view=rev
Log:
Modified validation query (executed by DBCP to verify that a connection is valid before borrowing it) to remove dependency on the the "example" component; thanks to Adam Heath and Jacques Le Roux for the suggestions and tests to find out a proper SQL statement (db independent and efficient).


Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java?rev=1342310&r1=1342309&r2=1342310&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java Thu May 24 16:12:05 2012
@@ -147,7 +147,7 @@ public class DBCPConnectionFactory imple
 
             // create the pool object factory
             PoolableConnectionFactory factory = new PoolableConnectionFactory(xacf, pool, null, null, true, true);
-            factory.setValidationQuery("select example_type_id from example_type limit 1");
+            factory.setValidationQuery("select 1 from entity_key_store where key_name = ''");
             factory.setDefaultReadOnly(false);
 
             String transIso = jdbcElement.getAttribute("isolation-level");