Revision: 3301
http://dspace.svn.sourceforge.net/dspace/?rev=3301&view=rev
Author: azeckoski
Date: 2008-11-18 15:08:17 +0000 (Tue, 18 Nov 2008)
Log Message:
-----------
DS2
This has a working setup with the spring lazy datasource, I am seeing a significant delay in test times with this running so I am recording it here:
28 seconds without this, 33 seconds with it (around 10% increase), considering the datasource connection fetching is such a small part of the tests in general this is a big jump
Modified Paths:
--------------
dspace2/trunk/impl/src/main/java/org/dspace/database/DSpaceDataSource.java
Modified: dspace2/trunk/impl/src/main/java/org/dspace/database/DSpaceDataSource.java
===================================================================
--- dspace2/trunk/impl/src/main/java/org/dspace/database/DSpaceDataSource.java 2008-11-18 14:59:06 UTC (rev 3300)
+++ dspace2/trunk/impl/src/main/java/org/dspace/database/DSpaceDataSource.java 2008-11-18 15:08:17 UTC (rev 3301)
@@ -163,14 +163,14 @@
cpds.setMaxIdleTimeExcessConnections(600);
}
- dataSource = cpds;
-// // wrap the DataSource in a lazy proxy (causes all connections to load lazy)
-// LazyConnectionDataSourceProxy lazy = new LazyConnectionDataSourceProxy(cpds);
-// lazy.setDefaultAutoCommit(false);
-//
-// // now set the DataSource we are using to the wrapper
-// dataSource = lazy;
+// dataSource = cpds;
+ // wrap the DataSource in a lazy proxy (causes all connections to load lazy)
+ LazyConnectionDataSourceProxy lazy = new LazyConnectionDataSourceProxy(cpds);
+ lazy.setDefaultAutoCommit(false);
+ // now set the DataSource we are using to the wrapper
+ dataSource = lazy;
+
Connection connection = null;
// try opening and closing a connection
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.