From: <sp...@us...> - 2011-06-24 16:56:13
|
Revision: 7914 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=7914&view=rev Author: sppigot Date: 2011-06-24 16:56:07 +0000 (Fri, 24 Jun 2011) Log Message: ----------- #542 Modified Paths: -------------- trunk/jeeves/src/main/java/jeeves/resources/dbms/ApacheDBCPool.java Modified: trunk/jeeves/src/main/java/jeeves/resources/dbms/ApacheDBCPool.java =================================================================== --- trunk/jeeves/src/main/java/jeeves/resources/dbms/ApacheDBCPool.java 2011-06-24 16:34:19 UTC (rev 7913) +++ trunk/jeeves/src/main/java/jeeves/resources/dbms/ApacheDBCPool.java 2011-06-24 16:56:07 UTC (rev 7914) @@ -96,8 +96,13 @@ size = config.getChildText(Jeeves.Res.Pool.POOL_SIZE); maxw = config.getChildText(Jeeves.Res.Pool.MAX_WAIT); - this.name = url; + // hack the url for postgis to postgres + String actualUrl = url; + if (actualUrl.contains("postgis")) + actualUrl = actualUrl.replaceFirst("postgis", "postgresql"); + this.name = actualUrl; + poolSize = (size == null) ? Jeeves.Res.Pool.DEF_POOL_SIZE : Integer .parseInt(size); maxWait = (maxw == null) ? Jeeves.Res.Pool.DEF_MAX_WAIT : Integer @@ -140,14 +145,10 @@ GenericObjectPool.DEFAULT_TEST_WHILE_IDLE); // create the connection factory with the url provided in the config - // hack the url for postgis to postgres - String actualUrl = url; String validationQuery = "Select 1"; boolean defaultReadOnly = false; boolean defaultAutoCommit = false; - if (actualUrl.contains("postgis")) - actualUrl = actualUrl.replaceFirst("postgis", "postgresql"); ConnectionFactory connectionFactory = new DriverManagerConnectionFactory( actualUrl, user, passwd); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |