commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r1136182 - /commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/managed/TestManagedDataSource.java
Date Wed, 15 Jun 2011 20:37:14 GMT
Author: psteitz
Date: Wed Jun 15 20:37:13 2011
New Revision: 1136182

URL: http://svn.apache.org/viewvc?rev=1136182&view=rev
Log:
Dropped redundant factory setter calls (which now throw ISE in pool2).

Modified:
    commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/managed/TestManagedDataSource.java

Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/managed/TestManagedDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/managed/TestManagedDataSource.java?rev=1136182&r1=1136181&r2=1136182&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/managed/TestManagedDataSource.java
(original)
+++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/managed/TestManagedDataSource.java
Wed Jun 15 20:37:13 2011
@@ -81,7 +81,6 @@ public class TestManagedDataSource exten
 
         // create the pool object factory
         PoolableConnectionFactory factory = new PoolableConnectionFactory(xaConnectionFactory,
pool, null, "SELECT DUMMY FROM DUAL", true, true);
-        pool.setFactory(factory);
 
         // finally create the datasource
         ds = new ManagedDataSource(pool, xaConnectionFactory.getTransactionRegistry());
@@ -187,8 +186,8 @@ public class TestManagedDataSource exten
         Properties props = new Properties();
         props.setProperty("user", "username");
         props.setProperty("password", "password");
-        NonDelegatingPoolableConnectionFactory factory = new NonDelegatingPoolableConnectionFactory(new
DriverConnectionFactory(new TesterDriver(), "jdbc:apache:commons:testdriver", props), pool);
-        pool.setFactory(factory);
+        NonDelegatingPoolableConnectionFactory factory = new NonDelegatingPoolableConnectionFactory(
+                new DriverConnectionFactory(new TesterDriver(), "jdbc:apache:commons:testdriver",
props), pool);
         ds = new PoolingDataSource(pool);
         checkManagedConnectionEqualsReflexive();
     }



Mime
View raw message