[cvs] expresso commit by rauld: connect call missing for datasource

JCorporate Ltd jcorp at jcorporate.com
Mon Jan 17 15:17:24 UTC 2005


Log Message:
-----------
connect call missing for datasource initialization bug fixed. Contributed by Yves Henri Amaizo

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/db:
        DBConnectionPool.java

Revision Data
-------------
Index: DBConnectionPool.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/db/DBConnectionPool.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/db/DBConnectionPool.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/db/DBConnectionPool.java -u -r1.56 -r1.57
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/db/DBConnectionPool.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/db/DBConnectionPool.java
@@ -401,6 +401,7 @@
         if (dbDriverType.equalsIgnoreCase("datasource")) {
             JDBCConfig myJdbc = getJDBCConfig(getDataContext());
             oneConnection = new DBConnection(myJdbc);
+            oneConnection.connect(jndiDS);
         } else {
             oneConnection = new DBConnection(dbDriver, dbURL, dbConnectFormat);
             oneConnection.connect(dbLogin, dbPassword);
@@ -685,8 +686,8 @@
                     connectionsToBeRemoved.add(new Integer(oneConnection.getId()));
 
 					// Added to solve deadlock problem when used in mode transactional mode.
-					// The connection was disconnect and release from the pool after the force of 
-					// completion of the process on going. Rollback id done before the disconnect and if 
+					// The connection was disconnect and release from the pool after the force of
+					// completion of the process on going. Rollback id done before the disconnect and if
 					// the the connection is not immortal by the user.
 					// Notification log message is send to advise the system adminitrator in case
 					// the connection is explicitly set to immortal.
@@ -805,7 +806,7 @@
 
 
 	/**
-	 * This allows an updated to be done to a database without disconnecting all previous connection on the pool. 
+	 * This allows an updated to be done to a database without disconnecting all previous connection on the pool.
 	 * (Such as drop table)  should ensure that no tables are in use when this update
 	 * is executed.
 	 *


More information about the cvs mailing list