Author: bpapez
Date: Wed Jun 6 17:46:40 2007
New Revision: 17476
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D17476&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:
branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/database/=
CallableStatementWrapper.java
branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/database/=
PreparedStatementWrapper.java
branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/database/=
StatementWrapper.java
Modified:
branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/database/=
ConnectionDispenser.java
branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/database/=
ConnectionWrapper.java
branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/config/dbpool.=
properties
Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/dat=
abase/ConnectionDispenser.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/services/database/ConnectionDispenser.java&=
rev=3D17476&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
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/database/=
ConnectionDispenser.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/database/=
ConnectionDispenser.java Wed Jun 6 17:46:40 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: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/dat=
abase/ConnectionWrapper.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/services/database/ConnectionWrapper.java&re=
v=3D17476&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
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/database/=
ConnectionWrapper.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/database/=
ConnectionWrapper.java Wed Jun 6 17:46:40 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: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/config/d=
bpool.properties
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/webapp/WEB-INF/etc/config/dbpool.properties&rev=3D17476&re=
pname=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
--- branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/config/dbpool.=
properties (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/config/dbpool.=
properties Wed Jun 6 17:46:40 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