Author: bpapez
Date: Fri Jun 15 14:33:56 2007
New Revision: 17579

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D17579&repname=
=3Djahia
Log:
issue JAHIA-1729: 4.2 - 7021: impossible to install - problem at the end of=
 the config wizard! =


Removing the Jahia statement wrappers and setting the
basicDataSource.setPoolPreparedStatements(true) if the customer has no data=
source specified on his
own. If the customer uses his own datasource, he must switch on prepared st=
atement caching within the
configuration of his datasource.

Removed:
    trunk/core/src/java/org/jahia/services/database/CallableStatementWrappe=
r.java
    trunk/core/src/java/org/jahia/services/database/PreparedStatementWrappe=
r.java
    trunk/core/src/java/org/jahia/services/database/StatementWrapper.java
Modified:
    trunk/core/src/java/org/jahia/services/database/ConnectionDispenser.java
    trunk/core/src/java/org/jahia/services/database/ConnectionWrapper.java
    trunk/core/src/webapp/WEB-INF/etc/config/dbpool.properties

Modified: trunk/core/src/java/org/jahia/services/database/ConnectionDispens=
er.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/java/o=
rg/jahia/services/database/ConnectionDispenser.java&rev=3D17579&repname=3Dj=
ahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/java/org/jahia/services/database/ConnectionDispenser.jav=
a (original)
+++ trunk/core/src/java/org/jahia/services/database/ConnectionDispenser.jav=
a Fri Jun 15 14:33:56 2007
@@ -44,6 +44,7 @@
  * <p>Company: Jahia Ltd</p>
  * @author Serge Huber
  * @version 1.0
+ * @deprecated use Hibernate or get the datasource from connection pool (e=
.g. Apache DBCP) =

  */
 =

 public class ConnectionDispenser {

Modified: trunk/core/src/java/org/jahia/services/database/ConnectionWrapper=
.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/java/o=
rg/jahia/services/database/ConnectionWrapper.java&rev=3D17579&repname=3Djah=
ia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/java/org/jahia/services/database/ConnectionWrapper.java =
(original)
+++ trunk/core/src/java/org/jahia/services/database/ConnectionWrapper.java =
Fri Jun 15 14:33:56 2007
@@ -43,21 +43,11 @@
     public void close() throws SQLException {
     }
     public void realClose() throws SQLException {
-        try {
-
-            for (Iterator ite =3D cachedStatements.keySet().iterator(); ite
-                    .hasNext();) {
-                StatementWrapper eps =3D (StatementWrapper) cachedStatemen=
ts
-                        .get(ite.next());
-                eps.closeReally();
-            }
-        } finally {
-            connection.close();
-        }
+        connection.close();
     }
     public void commit() throws SQLException {connection.commit();}
     public Statement createStatement() throws SQLException {
-        return new StatementWrapper(connection.createStatement());
+        return connection.createStatement();
     }
     public Statement createStatement(int resultSetType, int resultSetConcu=
rrency) throws SQLException {
         return connection.createStatement(resultSetType, resultSetConcurre=
ncy);
@@ -101,17 +91,8 @@
     public CallableStatement prepareCall(String sql, int resultSetType, in=
t resultSetConcurrency, int resultSetHoldability) throws SQLException {
         return connection.prepareCall(sql, resultSetType, resultSetConcurr=
ency, resultSetHoldability);
     }
-    /**
-     * EP Specific : caching preparedStatement for performance enhancement
-     */
     public PreparedStatement prepareStatement(String sql) throws SQLExcept=
ion {
-        PreparedStatement ps =3D (PreparedStatement)cachedStatements.get(s=
ql);
-        if (ps =3D=3D null) {
-            ps =3D new PreparedStatementWrapper(connection.prepareStatemen=
t(sql));
-            cachedStatements.put(sql, ps);
-        }
-
-        return ps;
+        return connection.prepareStatement(sql);
     }
     public PreparedStatement prepareStatement(String sql, int autoGenerate=
dKeys) throws SQLException {
         return connection.prepareStatement(sql, autoGeneratedKeys);

Modified: trunk/core/src/webapp/WEB-INF/etc/config/dbpool.properties
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/webapp=
/WEB-INF/etc/config/dbpool.properties&rev=3D17579&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/webapp/WEB-INF/etc/config/dbpool.properties (original)
+++ trunk/core/src/webapp/WEB-INF/etc/config/dbpool.properties Fri Jun 15 1=
4:33:56 2007
@@ -15,13 +15,13 @@
 #int.loginTimeout=3D
 int.maxActive=3D100
 int.maxIdle=3D10
-#int.maxOpenPreparedStatements=3D
+int.maxOpenPreparedStatements=3D0
 long.maxWait=3D10000
 #long.minEvictableIdleTimeMillis=3D
 #int.minIdle=3D123
 #int.numTestsPerEvictionRun=3D
 #String.password=3D
-#boolean.poolPreparedStatements=3D
+boolean.poolPreparedStatements=3Dtrue
 #boolean.testOnBorrow=3D
 #boolean.testOnReturn=3D
 #boolean.testWhileIdle=3D

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to