db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r378313 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/checkDataSource.out master/checkDataSource30.out tests/jdbcapi/checkDataSource.java tests/jdbcapi/checkDataSource30.java util/TestUtil.java
Date Thu, 16 Feb 2006 17:35:18 GMT
Author: kmarsden
Date: Thu Feb 16 09:35:12 2006
New Revision: 378313

URL: http://svn.apache.org/viewcvs?rev=378313&view=rev
Log:
DERBY-435 patch 1.  Cleanup geared toward getting checkDataSource and checkDataSo
urce30.java running for network server

- Changes the test to use the TestUtil.getDatasource methods
- Changes the names to be generic.
- organizes imports
- Adds getSimpleDataSource to TestUtil



Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource30.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out?rev=378313&r1=378312&r2=378313&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource.out
Thu Feb 16 09:35:12 2006
@@ -13,7 +13,7 @@
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
 DriverManager  <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running connection checks on EmbeddedDataSource
+Running connection checks on DataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -22,10 +22,10 @@
 setTypeMap(null) - ok XJ081 - Invalid value 'null' passed as parameter 'map' to method 'java.sql.Connection.setTypeMap'
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 method calls on a closed connection
-EmbeddedDataSource <closedconn>.close() no error
-EmbeddedDataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running connection checks on EmbeddedSimpleDataSource
+DataSource <closedconn>.close() no error
+DataSource <closedconn>.createStatement() 08003 - No current connection.
+DataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on SimpleDataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -34,10 +34,10 @@
 setTypeMap(null) - ok XJ081 - Invalid value 'null' passed as parameter 'map' to method 'java.sql.Connection.setTypeMap'
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 method calls on a closed connection
-EmbeddedSimpleDataSource <closedconn>.close() no error
-EmbeddedSimpleDataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedSimpleDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running connection checks on EmbeddedConnectionPoolDataSource
+SimpleDataSource <closedconn>.close() no error
+SimpleDataSource <closedconn>.createStatement() 08003 - No current connection.
+SimpleDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -47,10 +47,10 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(1):connectionClosed
 method calls on a closed connection
-EmbeddedConnectionPoolDataSource <closedconn>.close() no error
-EmbeddedConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current
connection.
-EmbeddedConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running connection checks on EmbeddedConnectionPoolDataSource
+ConnectionPoolDataSource <closedconn>.close() no error
+ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
+ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -60,19 +60,19 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(1):connectionClosed
 method calls on a closed connection
-EmbeddedConnectionPoolDataSource <closedconn>.close() no error
-EmbeddedConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current
connection.
-EmbeddedConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
+ConnectionPoolDataSource <closedconn>.close() no error
+ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
+ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
 Changes rolled back OK in auto closed pooled connection
 EVENT(1):connectionClosed
 expected SQL Exception: No current connection.
 expected SQL Exception: No current connection.
-Start testPoolReset EmbeddedConnectionPoolDataSource
+Start testPoolReset ConnectionPoolDataSource
 IDENTITY_VAL_LOCAL=1
 IDENTITY_VAL_LOCAL=2
 IDENTITY_VAL_LOCAL=3
-End testPoolReset EmbeddedConnectionPoolDataSource
-Running connection checks on EmbeddedXADataSource
+End testPoolReset ConnectionPoolDataSource
+Running connection checks on XADataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -82,16 +82,16 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(3):connectionClosed
 method calls on a closed connection
-EmbeddedXADataSource <closedconn>.close() no error
-EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+XADataSource <closedconn>.close() no error
+XADataSource <closedconn>.createStatement() 08003 - No current connection.
+XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
 Changes rolled back OK in auto closed local XAConnection
 EVENT(3):connectionClosed
-Start testPoolReset EmbeddedXADataSource
+Start testPoolReset XADataSource
 IDENTITY_VAL_LOCAL=1
 IDENTITY_VAL_LOCAL=2
 IDENTITY_VAL_LOCAL=3
-End testPoolReset EmbeddedXADataSource
+End testPoolReset XADataSource
 ERROR XJ015: Derby system shutdown.
 Running connection checks on Nested
   isolation level 2
@@ -108,7 +108,7 @@
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
 DriverManager  <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running connection checks on EmbeddedDataSource
+Running connection checks on DataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -117,9 +117,9 @@
 setTypeMap(null) - ok XJ081 - Invalid value 'null' passed as parameter 'map' to method 'java.sql.Connection.setTypeMap'
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 method calls on a closed connection
-EmbeddedDataSource <closedconn>.close() no error
-EmbeddedDataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+DataSource <closedconn>.close() no error
+DataSource <closedconn>.createStatement() 08003 - No current connection.
+DataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
 Running connection checks on EmbeddedSimpleDataSource
   isolation level 2
   auto commit     true
@@ -132,7 +132,7 @@
 EmbeddedSimpleDataSource <closedconn>.close() no error
 EmbeddedSimpleDataSource <closedconn>.createStatement() 08003 - No current connection.
 EmbeddedSimpleDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running connection checks on EmbeddedConnectionPoolDataSource
+Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -142,10 +142,10 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(2):connectionClosed
 method calls on a closed connection
-EmbeddedConnectionPoolDataSource <closedconn>.close() no error
-EmbeddedConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current
connection.
-EmbeddedConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running connection checks on EmbeddedConnectionPoolDataSource
+ConnectionPoolDataSource <closedconn>.close() no error
+ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
+ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -155,10 +155,10 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(2):connectionClosed
 method calls on a closed connection
-EmbeddedConnectionPoolDataSource <closedconn>.close() no error
-EmbeddedConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current
connection.
-EmbeddedConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running connection checks on EmbeddedXADataSource
+ConnectionPoolDataSource <closedconn>.close() no error
+ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
+ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on XADataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -168,10 +168,10 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(4):connectionClosed
 method calls on a closed connection
-EmbeddedXADataSource <closedconn>.close() no error
-EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running connection checks on EmbeddedXADataSource
+XADataSource <closedconn>.close() no error
+XADataSource <closedconn>.createStatement() 08003 - No current connection.
+XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on XADataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -181,11 +181,11 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(4):connectionClosed
 method calls on a closed connection
-EmbeddedXADataSource <closedconn>.close() no error
-EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+XADataSource <closedconn>.close() no error
+XADataSource <closedconn>.createStatement() 08003 - No current connection.
+XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
 EVENT(5):connectionClosed
-Running connection checks on Global EmbeddedXADataSource
+Running connection checks on Global XADataSource
   isolation level 2
   auto commit     false
   read only       false
@@ -194,10 +194,10 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Global EmbeddedXADataSource <closedconn>.close() no error
-Global EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running connection checks on Global EmbeddedXADataSource
+Global XADataSource <closedconn>.close() no error
+Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on Global XADataSource
   isolation level 2
   auto commit     false
   read only       false
@@ -206,10 +206,10 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Global EmbeddedXADataSource <closedconn>.close() no error
-Global EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running connection checks on Switch to local EmbeddedXADataSource
+Global XADataSource <closedconn>.close() no error
+Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on Switch to local XADataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -219,10 +219,10 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Switch to local EmbeddedXADataSource <closedconn>.close() no error
-Switch to local EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current
connection.
-Switch to local EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running connection checks on Switch to local EmbeddedXADataSource
+Switch to local XADataSource <closedconn>.close() no error
+Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Switch to local XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on Switch to local XADataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -232,10 +232,10 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Switch to local EmbeddedXADataSource <closedconn>.close() no error
-Switch to local EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current
connection.
-Switch to local EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running connection checks on Switch to global EmbeddedXADataSource
+Switch to local XADataSource <closedconn>.close() no error
+Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Switch to local XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on Switch to global XADataSource
   isolation level 2
   auto commit     false
   read only       false
@@ -245,10 +245,10 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Switch to global EmbeddedXADataSource <closedconn>.close() no error
-Switch to global EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current
connection.
-Switch to global EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running connection checks on Switch to global EmbeddedXADataSource
+Switch to global XADataSource <closedconn>.close() no error
+Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Switch to global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running connection checks on Switch to global XADataSource
   isolation level 2
   auto commit     false
   read only       false
@@ -258,9 +258,9 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Switch to global EmbeddedXADataSource <closedconn>.close() no error
-Switch to global EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current
connection.
-Switch to global EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
+Switch to global XADataSource <closedconn>.close() no error
+Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Switch to global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
 initial local
   isolation level READ_COMMITTED
   auto commit     true

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out?rev=378313&r1=378312&r2=378313&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDataSource30.out
Thu Feb 16 09:35:12 2006
@@ -16,10 +16,10 @@
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
 DriverManager  <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running JDBC 3.0 connection checks on EmbeddedDataSource
+Running JDBC 3.0 connection checks on DataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on EmbeddedDataSource
+Running connection checks on DataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -28,13 +28,13 @@
 setTypeMap(null) - ok XJ081 - Invalid value 'null' passed as parameter 'map' to method 'java.sql.Connection.setTypeMap'
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 method calls on a closed connection
-EmbeddedDataSource <closedconn>.close() no error
-EmbeddedDataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running JDBC 3.0 connection checks on EmbeddedSimpleDataSource
+DataSource <closedconn>.close() no error
+DataSource <closedconn>.createStatement() 08003 - No current connection.
+DataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on SimpleDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on EmbeddedSimpleDataSource
+Running connection checks on SimpleDataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -43,13 +43,13 @@
 setTypeMap(null) - ok XJ081 - Invalid value 'null' passed as parameter 'map' to method 'java.sql.Connection.setTypeMap'
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 method calls on a closed connection
-EmbeddedSimpleDataSource <closedconn>.close() no error
-EmbeddedSimpleDataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedSimpleDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running JDBC 3.0 connection checks on EmbeddedConnectionPoolDataSource
+SimpleDataSource <closedconn>.close() no error
+SimpleDataSource <closedconn>.createStatement() 08003 - No current connection.
+SimpleDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on EmbeddedConnectionPoolDataSource
+Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -59,13 +59,13 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(1):connectionClosed
 method calls on a closed connection
-EmbeddedConnectionPoolDataSource <closedconn>.close() no error
-EmbeddedConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current
connection.
-EmbeddedConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running JDBC 3.0 connection checks on EmbeddedConnectionPoolDataSource
+ConnectionPoolDataSource <closedconn>.close() no error
+ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
+ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on EmbeddedConnectionPoolDataSource
+Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -75,22 +75,22 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(1):connectionClosed
 method calls on a closed connection
-EmbeddedConnectionPoolDataSource <closedconn>.close() no error
-EmbeddedConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current
connection.
-EmbeddedConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
+ConnectionPoolDataSource <closedconn>.close() no error
+ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
+ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
 Changes rolled back OK in auto closed pooled connection
 EVENT(1):connectionClosed
 expected SQL Exception: No current connection.
 expected SQL Exception: No current connection.
-Start testPoolReset EmbeddedConnectionPoolDataSource
+Start testPoolReset ConnectionPoolDataSource
 IDENTITY_VAL_LOCAL=1
 IDENTITY_VAL_LOCAL=2
 IDENTITY_VAL_LOCAL=3
-End testPoolReset EmbeddedConnectionPoolDataSource
-Running JDBC 3.0 connection checks on EmbeddedXADataSource
+End testPoolReset ConnectionPoolDataSource
+Running JDBC 3.0 connection checks on XADataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on EmbeddedXADataSource
+Running connection checks on XADataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -100,16 +100,16 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(3):connectionClosed
 method calls on a closed connection
-EmbeddedXADataSource <closedconn>.close() no error
-EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+XADataSource <closedconn>.close() no error
+XADataSource <closedconn>.createStatement() 08003 - No current connection.
+XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
 Changes rolled back OK in auto closed local XAConnection
 EVENT(3):connectionClosed
-Start testPoolReset EmbeddedXADataSource
+Start testPoolReset XADataSource
 IDENTITY_VAL_LOCAL=1
 IDENTITY_VAL_LOCAL=2
 IDENTITY_VAL_LOCAL=3
-End testPoolReset EmbeddedXADataSource
+End testPoolReset XADataSource
 ERROR XJ015: Derby system shutdown.
 Running connection checks on Nested
   isolation level 2
@@ -129,10 +129,10 @@
 DriverManager  <closedconn>.close() no error
 DriverManager  <closedconn>.createStatement() 08003 - No current connection.
 DriverManager  <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running JDBC 3.0 connection checks on EmbeddedDataSource
+Running JDBC 3.0 connection checks on DataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on EmbeddedDataSource
+Running connection checks on DataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -141,9 +141,9 @@
 setTypeMap(null) - ok XJ081 - Invalid value 'null' passed as parameter 'map' to method 'java.sql.Connection.setTypeMap'
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 method calls on a closed connection
-EmbeddedDataSource <closedconn>.close() no error
-EmbeddedDataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+DataSource <closedconn>.close() no error
+DataSource <closedconn>.createStatement() 08003 - No current connection.
+DataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
 Running JDBC 3.0 connection checks on EmbeddedSimpleDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
@@ -159,10 +159,10 @@
 EmbeddedSimpleDataSource <closedconn>.close() no error
 EmbeddedSimpleDataSource <closedconn>.createStatement() 08003 - No current connection.
 EmbeddedSimpleDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running JDBC 3.0 connection checks on EmbeddedConnectionPoolDataSource
+Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on EmbeddedConnectionPoolDataSource
+Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -172,13 +172,13 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(2):connectionClosed
 method calls on a closed connection
-EmbeddedConnectionPoolDataSource <closedconn>.close() no error
-EmbeddedConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current
connection.
-EmbeddedConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running JDBC 3.0 connection checks on EmbeddedConnectionPoolDataSource
+ConnectionPoolDataSource <closedconn>.close() no error
+ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
+ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on ConnectionPoolDataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on EmbeddedConnectionPoolDataSource
+Running connection checks on ConnectionPoolDataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -188,13 +188,13 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(2):connectionClosed
 method calls on a closed connection
-EmbeddedConnectionPoolDataSource <closedconn>.close() no error
-EmbeddedConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current
connection.
-EmbeddedConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running JDBC 3.0 connection checks on EmbeddedXADataSource
+ConnectionPoolDataSource <closedconn>.close() no error
+ConnectionPoolDataSource <closedconn>.createStatement() 08003 - No current connection.
+ConnectionPoolDataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on XADataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on EmbeddedXADataSource
+Running connection checks on XADataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -204,13 +204,13 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(4):connectionClosed
 method calls on a closed connection
-EmbeddedXADataSource <closedconn>.close() no error
-EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running JDBC 3.0 connection checks on EmbeddedXADataSource
+XADataSource <closedconn>.close() no error
+XADataSource <closedconn>.createStatement() 08003 - No current connection.
+XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on XADataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on EmbeddedXADataSource
+Running connection checks on XADataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -220,14 +220,14 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(4):connectionClosed
 method calls on a closed connection
-EmbeddedXADataSource <closedconn>.close() no error
-EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current connection.
-EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+XADataSource <closedconn>.close() no error
+XADataSource <closedconn>.createStatement() 08003 - No current connection.
+XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
 EVENT(5):connectionClosed
-Running JDBC 3.0 connection checks on Global EmbeddedXADataSource
+Running JDBC 3.0 connection checks on Global XADataSource
   holdability     false
 JDBC 3.0 savepoint SQL Exception: Cannot rollback a global transaction using the Connection,
commit processing must go thru XAResource interface.
-Running connection checks on Global EmbeddedXADataSource
+Running connection checks on Global XADataSource
   isolation level 2
   auto commit     false
   read only       false
@@ -236,13 +236,13 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Global EmbeddedXADataSource <closedconn>.close() no error
-Global EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running JDBC 3.0 connection checks on Global EmbeddedXADataSource
+Global XADataSource <closedconn>.close() no error
+Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on Global XADataSource
   holdability     false
 JDBC 3.0 savepoint SQL Exception: Cannot rollback a global transaction using the Connection,
commit processing must go thru XAResource interface.
-Running connection checks on Global EmbeddedXADataSource
+Running connection checks on Global XADataSource
   isolation level 2
   auto commit     false
   read only       false
@@ -251,13 +251,13 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Global EmbeddedXADataSource <closedconn>.close() no error
-Global EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current connection.
-Global EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
-Running JDBC 3.0 connection checks on Switch to local EmbeddedXADataSource
+Global XADataSource <closedconn>.close() no error
+Global XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on Switch to local XADataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on Switch to local EmbeddedXADataSource
+Running connection checks on Switch to local XADataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -267,13 +267,13 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Switch to local EmbeddedXADataSource <closedconn>.close() no error
-Switch to local EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current
connection.
-Switch to local EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running JDBC 3.0 connection checks on Switch to local EmbeddedXADataSource
+Switch to local XADataSource <closedconn>.close() no error
+Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Switch to local XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on Switch to local XADataSource
   holdability     true
 JDBC 3.0 savepoint SQL Exception: Cannot issue savepoint when autoCommit is on.
-Running connection checks on Switch to local EmbeddedXADataSource
+Running connection checks on Switch to local XADataSource
   isolation level 2
   auto commit     true
   read only       false
@@ -283,13 +283,13 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Switch to local EmbeddedXADataSource <closedconn>.close() no error
-Switch to local EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current
connection.
-Switch to local EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running JDBC 3.0 connection checks on Switch to global EmbeddedXADataSource
+Switch to local XADataSource <closedconn>.close() no error
+Switch to local XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Switch to local XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on Switch to global XADataSource
   holdability     false
 JDBC 3.0 savepoint SQL Exception: Cannot rollback a global transaction using the Connection,
commit processing must go thru XAResource interface.
-Running connection checks on Switch to global EmbeddedXADataSource
+Running connection checks on Switch to global XADataSource
   isolation level 2
   auto commit     false
   read only       false
@@ -299,13 +299,13 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Switch to global EmbeddedXADataSource <closedconn>.close() no error
-Switch to global EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current
connection.
-Switch to global EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
-Running JDBC 3.0 connection checks on Switch to global EmbeddedXADataSource
+Switch to global XADataSource <closedconn>.close() no error
+Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Switch to global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
+Running JDBC 3.0 connection checks on Switch to global XADataSource
   holdability     false
 JDBC 3.0 savepoint SQL Exception: Cannot rollback a global transaction using the Connection,
commit processing must go thru XAResource interface.
-Running connection checks on Switch to global EmbeddedXADataSource
+Running connection checks on Switch to global XADataSource
   isolation level 2
   auto commit     false
   read only       false
@@ -315,9 +315,9 @@
 setTypeMap(map) - ok 0A000 - Feature not implemented: no details.
 EVENT(5):connectionClosed
 method calls on a closed connection
-Switch to global EmbeddedXADataSource <closedconn>.close() no error
-Switch to global EmbeddedXADataSource <closedconn>.createStatement() 08003 - No current
connection.
-Switch to global EmbeddedXADataSource <closedstmt>.execute() XJ012 - 'Statement' already
closed.
+Switch to global XADataSource <closedconn>.close() no error
+Switch to global XADataSource <closedconn>.createStatement() 08003 - No current connection.
+Switch to global XADataSource <closedstmt>.execute() XJ012 - 'Statement' already closed.
 initial local
   holdability     true
   isolation level READ_COMMITTED

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java?rev=378313&r1=378312&r2=378313&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
Thu Feb 16 09:35:12 2006
@@ -20,39 +20,37 @@
 
 package org.apache.derbyTesting.functionTests.tests.jdbcapi;
 
-import org.apache.derby.jdbc.EmbeddedDataSource;
-import org.apache.derby.jdbc.EmbeddedSimpleDataSource;
-import org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource;
-import org.apache.derby.jdbc.EmbeddedXADataSource;
-
+import java.io.Serializable;
+import java.sql.CallableStatement;
 import java.sql.Connection;
-import java.sql.ResultSet;
+import java.sql.DriverManager;
 import java.sql.PreparedStatement;
-import java.sql.CallableStatement;
-import java.sql.Statement;
+import java.sql.ResultSet;
 import java.sql.SQLException;
-import java.sql.DriverManager;
+import java.sql.Statement;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Properties;
 
+import javax.sql.ConnectionEvent;
+import javax.sql.ConnectionEventListener;
+import javax.sql.ConnectionPoolDataSource;
 import javax.sql.DataSource;
-import javax.sql.XADataSource;
 import javax.sql.PooledConnection;
 import javax.sql.XAConnection;
-import javax.sql.ConnectionPoolDataSource;
-import javax.transaction.xa.XAResource;
+import javax.sql.XADataSource;
 import javax.transaction.xa.XAException;
+import javax.transaction.xa.XAResource;
 import javax.transaction.xa.Xid;
-import javax.sql.ConnectionEventListener;
-import javax.sql.ConnectionEvent;
+
+import org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource;
+import org.apache.derby.jdbc.EmbeddedDataSource;
+import org.apache.derby.jdbc.EmbeddedXADataSource;
 import org.apache.derby.tools.JDBCDisplayUtil;
 import org.apache.derby.tools.ij;
 import org.apache.derbyTesting.functionTests.util.SecurityCheck;
-
-import java.io.*;
-import java.util.Hashtable;
-import java.util.Iterator;
+import org.apache.derbyTesting.functionTests.util.TestUtil;
 import org.apache.oro.text.perl.Perl5Util;
-import javax.naming.*;
-import javax.naming.directory.*;
 
 /**
  * Test the various embedded DataSource implementations of Derby.
@@ -137,31 +135,29 @@
 		checkJBMSToString();
 
 
-		EmbeddedDataSource dscs = new EmbeddedDataSource();
-		dscs.setDatabaseName("wombat");
+		Properties attrs = new Properties();
+		attrs.setProperty("databaseName", "wombat");
+		DataSource dscs = TestUtil.getDataSource(attrs);
+		
 		checkToString(dscs);
 
 		DataSource ds = dscs;
 
-		checkConnection("EmbeddedDataSource", ds.getConnection());
+		checkConnection("DataSource", ds.getConnection());
 		
-		EmbeddedSimpleDataSource dssimple = new EmbeddedSimpleDataSource();
-		dssimple.setDatabaseName("wombat");
+		DataSource dssimple = TestUtil.getSimpleDataSource(attrs);
 		ds = dssimple;
-		checkConnection("EmbeddedSimpleDataSource", ds.getConnection());		
+		checkConnection("SimpleDataSource", ds.getConnection());		
 
-		EmbeddedConnectionPoolDataSource dscsp = new EmbeddedConnectionPoolDataSource();
-		dscsp.setDatabaseName("wombat");
-		//dscsp.setConnectionAttributes("unicode=true");
-		ConnectionPoolDataSource dsp = dscsp;
+		ConnectionPoolDataSource dsp = TestUtil.getConnectionPoolDataSource(attrs);
 		checkToString(dsp);
 
 		PooledConnection pc = dsp.getPooledConnection();
 		SecurityCheck.inspect(pc, "javax.sql.PooledConnection");
 		pc.addConnectionEventListener(new EventCatcher(1));
 
-		checkConnection("EmbeddedConnectionPoolDataSource", pc.getConnection());
-		checkConnection("EmbeddedConnectionPoolDataSource", pc.getConnection());
+		checkConnection("ConnectionPoolDataSource", pc.getConnection());
+		checkConnection("ConnectionPoolDataSource", pc.getConnection());
 
 		// BUG 4471 - check outstanding updates are rolled back.
 		Connection c1 = pc.getConnection();
@@ -206,21 +202,16 @@
 		pc.close();
 		pc = null;
 
-		testPoolReset("EmbeddedConnectionPoolDataSource", dsp.getPooledConnection());
-
-
-		EmbeddedXADataSource dscsx = new EmbeddedXADataSource();
-		dscsx.setDatabaseName("wombat");
-		//dscsx.setConnectionAttributes("unicode=true");
+		testPoolReset("ConnectionPoolDataSource", dsp.getPooledConnection());
 
-		XADataSource dsx = dscsx;
+		XADataSource dsx = TestUtil.getXADataSource(attrs);
 		checkToString(dsx);
 
 		XAConnection xac = dsx.getXAConnection();
 		SecurityCheck.inspect(xac, "javax.sql.XAConnection");
 		xac.addConnectionEventListener(new EventCatcher(3));
 
-		checkConnection("EmbeddedXADataSource", xac.getConnection());
+		checkConnection("XADataSource", xac.getConnection());
 
 		// BUG 4471 - check outstanding updates are rolled back wi XAConnection.
 		c1 = xac.getConnection();
@@ -248,12 +239,12 @@
 		xac.close();
 		xac = null;
 
-		testPoolReset("EmbeddedXADataSource", dsx.getXAConnection());
+		testPoolReset("XADataSource", dsx.getXAConnection());
 
 
 
 		try {
-			DriverManager.getConnection("jdbc:derby:;shutdown=true");
+			TestUtil.getConnection("","shutdown=true");
 		} catch (SQLException sqle) {
 			JDBCDisplayUtil.ShowSQLException(System.out, sqle);
 		}
@@ -268,9 +259,9 @@
 
 		checkConnection("DriverManager ", dmc);
 
-		// reset ds back to the EmbeddedDataSource
+		// reset ds back to the Regular DataSource
 		ds = dscs;
-		checkConnection("EmbeddedDataSource", ds.getConnection());
+		checkConnection("DataSource", ds.getConnection());
 		
 		// and back to EmbeddedSimpleDataSource
 		ds = dssimple;
@@ -278,14 +269,14 @@
 		
 		pc = dsp.getPooledConnection();
 		pc.addConnectionEventListener(new EventCatcher(2));
-		checkConnection("EmbeddedConnectionPoolDataSource", pc.getConnection());
-		checkConnection("EmbeddedConnectionPoolDataSource", pc.getConnection());
+		checkConnection("ConnectionPoolDataSource", pc.getConnection());
+		checkConnection("ConnectionPoolDataSource", pc.getConnection());
 
 		// test "local" XAConnections
 		xac = dsx.getXAConnection();
 		xac.addConnectionEventListener(new EventCatcher(4));
-		checkConnection("EmbeddedXADataSource", xac.getConnection());
-		checkConnection("EmbeddedXADataSource", xac.getConnection());
+		checkConnection("XADataSource", xac.getConnection());
+		checkConnection("XADataSource", xac.getConnection());
 		xac.close();
 
 		// test "global" XAConnections
@@ -297,19 +288,19 @@
 		xar.start(xid, XAResource.TMNOFLAGS);
 		Connection xacc = xac.getConnection();
 		xacc.close();
-		checkConnection("Global EmbeddedXADataSource", xac.getConnection());
-		checkConnection("Global EmbeddedXADataSource", xac.getConnection());
+		checkConnection("Global XADataSource", xac.getConnection());
+		checkConnection("Global XADataSource", xac.getConnection());
 
 		xar.end(xid, XAResource.TMSUCCESS);
 
-		checkConnection("Switch to local EmbeddedXADataSource", xac.getConnection());
-		checkConnection("Switch to local EmbeddedXADataSource", xac.getConnection());
+		checkConnection("Switch to local XADataSource", xac.getConnection());
+		checkConnection("Switch to local XADataSource", xac.getConnection());
 
 		Connection backtoGlobal = xac.getConnection();
 
 		xar.start(xid, XAResource.TMJOIN);
-		checkConnection("Switch to global EmbeddedXADataSource", backtoGlobal);
-		checkConnection("Switch to global EmbeddedXADataSource", xac.getConnection());
+		checkConnection("Switch to global XADataSource", backtoGlobal);
+		checkConnection("Switch to global XADataSource", xac.getConnection());
 		xar.end(xid, XAResource.TMSUCCESS);
 		xar.commit(xid, true);
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource30.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource30.java?rev=378313&r1=378312&r2=378313&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource30.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource30.java
Thu Feb 16 09:35:12 2006
@@ -20,38 +20,25 @@
 
 package org.apache.derbyTesting.functionTests.tests.jdbcapi;
 
-import org.apache.derby.jdbc.EmbeddedDataSource;
-import org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource;
-import org.apache.derby.jdbc.EmbeddedXADataSource;
-
+import java.sql.CallableStatement;
 import java.sql.Connection;
-import java.sql.ResultSet;
+import java.sql.ParameterMetaData;
 import java.sql.PreparedStatement;
-import java.sql.CallableStatement;
-import java.sql.Statement;
+import java.sql.ResultSet;
 import java.sql.SQLException;
-import java.sql.DriverManager;
-import java.sql.Savepoint;
-import java.sql.ParameterMetaData;
+import java.sql.Statement;
+import java.util.Properties;
 
-import javax.sql.DataSource;
-import javax.sql.XADataSource;
 import javax.sql.XAConnection;
-import javax.sql.ConnectionPoolDataSource;
-import javax.transaction.xa.XAResource;
+import javax.sql.XADataSource;
 import javax.transaction.xa.XAException;
+import javax.transaction.xa.XAResource;
 import javax.transaction.xa.Xid;
-import javax.sql.ConnectionEventListener;
-import javax.sql.ConnectionEvent;
+
 import org.apache.derby.tools.JDBCDisplayUtil;
-import org.apache.derby.tools.ij;
 import org.apache.derbyTesting.functionTests.util.SecurityCheck;
+import org.apache.derbyTesting.functionTests.util.TestUtil;
 
-import java.io.*;
-import java.util.Hashtable;
-
-import javax.naming.*;
-import javax.naming.directory.*;
 
 /**
  * Extends checkDataSource to provide testing of JDBC 3.0 specific
@@ -167,9 +154,10 @@
 	private void checkXAHoldability() {
 		System.out.println("START XA HOLDABILITY TEST");
 		try {
-			EmbeddedXADataSource dscsx = new EmbeddedXADataSource();
-			dscsx.setDatabaseName("wombat");
-
+			Properties attrs = new Properties();
+			attrs.setProperty("databaseName", "wombat");
+			XADataSource dscsx =  TestUtil.getXADataSource(attrs);
+		
 			XAConnection xac = dscsx.getXAConnection("fred", "wilma");
 			XAResource xr = xac.getXAResource();
 			Xid xid = getXid(25, (byte) 21, (byte) 01);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java?rev=378313&r1=378312&r2=378313&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
Thu Feb 16 09:35:12 2006
@@ -304,13 +304,21 @@
 	{
 		String classname;
 		if(HAVE_DRIVER_CLASS)
+		{
 			classname = getDataSourcePrefix() + REGULAR_DATASOURCE_STRING + "DataSource";
+			return (javax.sql.DataSource) getDataSourceWithReflection(classname, attrs);
+		}
 		else
-			classname = getDataSourcePrefix() + JSR169_DATASOURCE_STRING + "DataSource";
+			return getSimpleDataSource(attrs);
 		
-		return (javax.sql.DataSource) getDataSourceWithReflection(classname, attrs);
 	}
 
+	public static DataSource getSimpleDataSource(Properties attrs)
+	{
+		String classname = getDataSourcePrefix() + JSR169_DATASOURCE_STRING + "DataSource";
+		return (javax.sql.DataSource) getDataSourceWithReflection(classname, attrs);
+	}
+	
 	/**
 	 * Get an xa  data source for the appropriate framework
 	 * @param attrs  A set of attribute values to set on the datasource.



Mime
View raw message