From: <svn...@os...> - 2012-03-25 09:52:43
|
Author: aaime Date: 2012-03-25 02:52:36 -0700 (Sun, 25 Mar 2012) New Revision: 38644 Modified: trunk/docs/user/library/jdbc/datastore.rst trunk/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStoreFactory.java Log: [GEOT-4087] Make connection validation on by default Modified: trunk/docs/user/library/jdbc/datastore.rst =================================================================== --- trunk/docs/user/library/jdbc/datastore.rst 2012-03-25 09:40:50 UTC (rev 38643) +++ trunk/docs/user/library/jdbc/datastore.rst 2012-03-25 09:52:36 UTC (rev 38644) @@ -38,7 +38,11 @@ map.put( "max connections", 25); map.put( "min connections", 10); map.put( "connection timeout", 5); - map.put( "validating connections", true); + +Connection validation is on by default, it takes a small toll to make sure the connection is still valid before using it (e.g., make sure the DBMS did not drop it due to a server side timeout). +If you want to get extra performance and you're sure the connections will never be dropped you can disable connection validation with:: + + map.put( "validating connections", false); Connection Parameters ^^^^^^^^^^^^^^^^^^^^^ Modified: trunk/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStoreFactory.java =================================================================== --- trunk/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStoreFactory.java 2012-03-25 09:40:50 UTC (rev 38643) +++ trunk/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStoreFactory.java 2012-03-25 09:52:36 UTC (rev 38644) @@ -91,7 +91,7 @@ /** If connections should be validated before using them */ public static final Param VALIDATECONN = new Param("validate connections", Boolean .class, - "check connection is alive before using it", false, Boolean.FALSE); + "check connection is alive before using it", false, Boolean.TRUE); /** If connections should be validated before using them */ public static final Param FETCHSIZE = new Param("fetch size", Integer.class, |