db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r600674 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/tests/jdbc4/JDBC4FromJDBC3DataSourceTest.java junit/JDBCDataSource.java
Date Mon, 03 Dec 2007 20:35:35 GMT
Author: djd
Date: Mon Dec  3 12:35:34 2007
New Revision: 600674

URL: http://svn.apache.org/viewvc?rev=600674&view=rev
Log:
Remove tets utility methods to get XA & ConnectionPooling data sources from JDBCDataSource
because the existing class J2EEDataSource already had suitable methods.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/JDBC4FromJDBC3DataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/JDBC4FromJDBC3DataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/JDBC4FromJDBC3DataSourceTest.java?rev=600674&r1=600673&r2=600674&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/JDBC4FromJDBC3DataSourceTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/JDBC4FromJDBC3DataSourceTest.java
Mon Dec  3 12:35:34 2007
@@ -24,6 +24,7 @@
 import junit.framework.*;
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
+import org.apache.derbyTesting.junit.J2EEDataSource;
 import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.JDBCClient;
 import org.apache.derbyTesting.junit.JDBCDataSource;
@@ -78,8 +79,7 @@
      */
     public void testPooledConnection() throws Exception
     {
-        ConnectionPoolDataSource ds = (ConnectionPoolDataSource)
-            JDBCDataSource.getConnectionPoolDataSource();
+        ConnectionPoolDataSource ds = J2EEDataSource.getConnectionPoolDataSource();
 
         assertNonJDBC4DataSource((DataSource)ds);
         checkJDBC4Interface(ds.getPooledConnection());
@@ -91,8 +91,7 @@
      */
     public void testXAConnection() throws Exception
     {
-        XADataSource ds = 
-            (XADataSource) JDBCDataSource.getXADataSource();
+        XADataSource ds = J2EEDataSource.getXADataSource();
 
         assertNonJDBC4DataSource((DataSource)ds);
         checkJDBC4Interface(ds.getXAConnection());

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java?rev=600674&r1=600673&r2=600674&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java Mon
Dec  3 12:35:34 2007
@@ -29,7 +29,9 @@
 
 /**
  * Utility methods related to JDBC DataSource objects.
- *
+ * J2EEDataSource exists to return XA and connection pooling data sources.
+ * 
+ * @see J2EEDataSource
  */
 public class JDBCDataSource {
     
@@ -41,33 +43,6 @@
     public static javax.sql.DataSource getDataSource()
     {
         return getDataSource(TestConfiguration.getCurrent(), (HashMap) null);
-    }
-    
-    /**
-     * Return a ConnectionPoolDataSource corresponding to the current
-     * configuration.  This method returns a generic Object (as opposed
-     * to a ConnectionPoolDataSource) because this class has to work
-     * with JSR169 JVMs, as well, and those JVMs do not include the
-     * javax.sql.ConnectionPoolDataSource class.
-     */
-    public static Object getConnectionPoolDataSource()
-    {
-        TestConfiguration config = TestConfiguration.getCurrent();
-        return getDataSource(config, (HashMap) null,
-			config.getJDBCClient().getConnectionPoolDataSourceClassName());
-    }
-    
-    /*
-     * Return an XADataSource corresponding to the current configuration.
-     * This method returns a generic Object (as opposed to an XADataSource)
-     * because this class has to work with JSR169 JVMs, as well, and those
-     * JVMs do not include the javax.sql.XADataSource class.
-     */
-    public static Object getXADataSource()
-    {
-        TestConfiguration config = TestConfiguration.getCurrent();
-        return getDataSource(config, (HashMap) null,
-            config.getJDBCClient().getXADataSourceClassName());
     }
     
     /**



Mime
View raw message