db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1438035 [1/2] - in /db/derby/code/trunk/java: testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ testing/org/apache/derbyTesting/functionTests/tests/jdbc...
Date Thu, 24 Jan 2013 15:05:35 GMT
Author: dag
Date: Thu Jan 24 15:05:34 2013
New Revision: 1438035

URL: http://svn.apache.org/viewvc?rev=1438035&view=rev
Log:
DERBY-5955 DERBY-5955 Prepare Derby to run with Compact Profiles (JEP 161)

Patch derby-5955-make-tests-run-03. This makes the regression tests
work on CP2. Also, is updates the DataSourceSerializationTest for
10.10 with serialized data sourced for existing and the new
datasources.

Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientConnectionPoolDataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientDataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientXADataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedConnectionPoolDataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedDataSource40-10_10_1_0.ser   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedXADataSource40-10_10_1_0.ser   (with props)
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/JDBC4FromJDBC3DataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/Wrapper41DataSource.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceSerializationTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InvalidLDAPServerAuthenticationTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_1Indexing.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p3.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p4.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p6.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_Encrypted_1.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/SimplePerfTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/SimplePerfTest_Verify.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Derby.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/xaHelper.java

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientConnectionPoolDataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientDataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/ClientXADataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedConnectionPoolDataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedDataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/EmbeddedXADataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientConnectionPoolDataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientConnectionPoolDataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientConnectionPoolDataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientConnectionPoolDataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientConnectionPoolDataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientDataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientDataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientDataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientDataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientDataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientXADataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientXADataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientXADataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientXADataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIClientXADataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedConnectionPoolDataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedConnectionPoolDataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedConnectionPoolDataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedConnectionPoolDataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedConnectionPoolDataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedDataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedDataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedDataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedDataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedDataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedXADataSource40-10_10_1_0.ser
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedXADataSource40-10_10_1_0.ser?rev=1438035&view=auto
==============================================================================
Files db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedXADataSource40-10_10_1_0.ser (added) and db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedXADataSource40-10_10_1_0.ser Thu Jan 24 15:05:34 2013 differ

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/NonJNDIEmbeddedXADataSource40-10_10_1_0.ser
------------------------------------------------------------------------------
    svn:executable = *

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java?rev=1438035&r1=1438034&r2=1438035&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java Thu Jan 24 15:05:34 2013
@@ -28,10 +28,10 @@ import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 
 import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.Referenceable;
 import javax.sql.DataSource;
 
 import org.apache.derby.tools.sysinfo;
@@ -63,16 +63,28 @@ public class SerializeDataSources {
     private static final String[] KNOWN_EMBEDDED_DATA_SOURCES ={
             "org.apache.derby.jdbc.EmbeddedDataSource",
             "org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource",
-            "org.apache.derby.jdbc.EmbeddedXADataSource"
+            "org.apache.derby.jdbc.EmbeddedXADataSource",
+            "org.apache.derby.jdbc.EmbeddedDataSource40",
+            "org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40",
+            "org.apache.derby.jdbc.EmbeddedXADataSource40",
+            "org.apache.derby.jdbc.NonJNDIEmbeddedDataSource40",
+            "org.apache.derby.jdbc.NonJNDIEmbeddedConnectionPoolDataSource40",
+            "org.apache.derby.jdbc.NonJNDIEmbeddedXADataSource40"
         };
 
     /** List of known data sources in the client driver. */
     private static final String[] KNOWN_CLIENT_DATA_SOURCES ={
             "org.apache.derby.jdbc.ClientDataSource",
             "org.apache.derby.jdbc.ClientConnectionPoolDataSource",
-            "org.apache.derby.jdbc.ClientXADataSource"
+            "org.apache.derby.jdbc.ClientXADataSource",
+            "org.apache.derby.jdbc.ClientDataSource40",
+            "org.apache.derby.jdbc.ClientConnectionPoolDataSource40",
+            "org.apache.derby.jdbc.ClientXADataSource40",
+            "org.apache.derby.jdbc.NonJNDIClientDataSource40",
+            "org.apache.derby.jdbc.NonJNDIClientConnectionPoolDataSource40",
+            "org.apache.derby.jdbc.NonJNDIClientXADataSource40"
         };
-    
+
     /**
      * Serialize and write data sources to file.
      * 
@@ -92,8 +104,14 @@ public class SerializeDataSources {
                                             String buildNumber,
                                             String[] dataSourceClasses)
             throws ClassNotFoundException, InstantiationException,
-                   IllegalAccessException, IOException, NamingException {
-        String modifiedVersionString = versionString.replaceAll("\\.", "_");
+                   IllegalAccessException, IOException, NamingException,
+                   NoSuchMethodException, InvocationTargetException {
+        String modifiedVersionString = versionString.replaceAll(
+                "\\.", "_");
+        modifiedVersionString = modifiedVersionString.replaceAll(
+                " alpha", "");
+        modifiedVersionString = modifiedVersionString.replaceAll(
+                "_0_0", "_1_0");
         int dsCount = 0;
         for (String dsClassName : dataSourceClasses) {
             Class dsClass;
@@ -113,13 +131,18 @@ public class SerializeDataSources {
             System.out.println("\twriting " + serialized.getName());
             OutputStream os = new FileOutputStream(serialized);
             ObjectOutputStream oos = new ObjectOutputStream(os);
-            // Wrote version string, build number, the data source object and finally
-            // a {@link javax.naming.Reference} for the data source.
+            // Wrote version string, build number, the data source
+            // object and finally a {@link javax.naming.Reference} for
+            // the data source (if non a non-JNDI data source).
             oos.writeUTF(versionString);
             oos.writeUTF(buildNumber);
             oos.writeObject(ds);
-            Reference dsRef = ((Referenceable)ds).getReference(); 
-            oos.writeObject(dsRef);
+            if (!(dsClassName.contains("NonJNDI"))) {
+                Method getRef = Class.forName("javax.naming.Referenceable").
+                        getMethod("getReference");
+                Object dsRef = getRef.invoke(ds);
+                oos.writeObject(dsRef);
+            }
             oos.flush();
             oos.close();
             dsCount++;
@@ -157,8 +180,10 @@ public class SerializeDataSources {
             System.out.println("\tbuild  : " + buildNr);
             Object obj = ois.readObject();
             System.out.println("\tobject : " + obj);
-            obj = ois.readObject();
-            System.out.println("\tobject : " + obj);
+            if (!(obj.getClass().getName().indexOf("NonJNDI") > 0)) {
+                obj = ois.readObject();
+                System.out.println("\tobject : " + obj);
+            }
         } catch (Exception e) {
             System.out.println("\t!! De-serialization failed: " + e.getMessage());
             e.printStackTrace();

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=1438035&r1=1438034&r2=1438035&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 Thu Jan 24 15:05:34 2013
@@ -70,8 +70,8 @@ public class JDBC4FromJDBC3DataSourceTes
      */
     public static Test suite()
     {
-        // Only run this test if we have a JDBC 4 JVM.
-        if (JDBC.vmSupportsJDBC4())
+        // Only run this test if we have a JDBC 4 JVM on full SE
+        if (JDBC.vmSupportsJDBC4() && JDBC.vmSupportsJNDI())
         {
             return TestConfiguration.forceJDBC3Suite(
                 JDBC4FromJDBC3DataSourceTest.class);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/Wrapper41DataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/Wrapper41DataSource.java?rev=1438035&r1=1438034&r2=1438035&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/Wrapper41DataSource.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/Wrapper41DataSource.java Thu Jan 24 15:05:34 2013
@@ -24,13 +24,15 @@ package org.apache.derbyTesting.function
 import java.sql.SQLException;
 import java.util.logging.Logger;
 import javax.sql.CommonDataSource;
-
-import org.apache.derby.jdbc.EmbeddedDataSource40;
-import org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40;
-import org.apache.derby.jdbc.EmbeddedXADataSource40;
-import org.apache.derby.jdbc.ClientDataSource40;
 import org.apache.derby.jdbc.ClientConnectionPoolDataSource40;
+import org.apache.derby.jdbc.ClientDataSource40;
 import org.apache.derby.jdbc.ClientXADataSource40;
+import org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40;
+import org.apache.derby.jdbc.EmbeddedDataSource40;
+import org.apache.derby.jdbc.EmbeddedXADataSource40;
+import org.apache.derby.jdbc.NonJNDIClientDataSource40;
+import org.apache.derby.jdbc.NonJNDIEmbeddedDataSource40;
+import org.apache.derbyTesting.junit.JDBC;
 
 /**
  * A wrapper around the methods added by JDBC 4.1.
@@ -46,13 +48,16 @@ public  class   Wrapper41DataSource
     ///////////////////////////////////////////////////////////////////////
 
     private EmbeddedDataSource40    _embedded;
-    private ClientDataSource40      _netclient;
     private EmbeddedConnectionPoolDataSource40    _ecpds;
     private EmbeddedXADataSource40    _exads;
+    private NonJNDIEmbeddedDataSource40    _nonJNDIembedded;
+
+    private ClientDataSource40      _netclient;
     private ClientConnectionPoolDataSource40      _ccpds;
     private ClientXADataSource40      _cxads;
+    private NonJNDIClientDataSource40      _nonJNDInetclient;
+
 
-    
     ///////////////////////////////////////////////////////////////////////
     //
     // CONSTRUCTORS
@@ -61,13 +66,27 @@ public  class   Wrapper41DataSource
 
     public Wrapper41DataSource( Object wrapped ) throws Exception
     {
-        if ( wrapped instanceof EmbeddedDataSource40  ) { _embedded = (EmbeddedDataSource40 ) wrapped; }
-        else if ( wrapped instanceof EmbeddedConnectionPoolDataSource40 ) { _ecpds = (EmbeddedConnectionPoolDataSource40) wrapped; }
-        else if ( wrapped instanceof EmbeddedXADataSource40 ) { _exads = (EmbeddedXADataSource40) wrapped; }
-        else if ( wrapped instanceof ClientDataSource40 ) { _netclient = (ClientDataSource40) wrapped; }
-        else if ( wrapped instanceof ClientConnectionPoolDataSource40 ) { _ccpds = (ClientConnectionPoolDataSource40) wrapped; }
-        else if ( wrapped instanceof ClientXADataSource40 ) { _cxads = (ClientXADataSource40) wrapped; }
-        else { throw nothingWrapped(); }
+        if (JDBC.vmSupportsJNDI()) {
+            if ( wrapped instanceof EmbeddedDataSource40  ) {
+                _embedded = (EmbeddedDataSource40 ) wrapped; }
+            else if ( wrapped instanceof EmbeddedConnectionPoolDataSource40 ) {
+                _ecpds = (EmbeddedConnectionPoolDataSource40) wrapped; }
+            else if ( wrapped instanceof EmbeddedXADataSource40 ) {
+                _exads = (EmbeddedXADataSource40) wrapped; }
+            else if ( wrapped instanceof ClientDataSource40 ) {
+                _netclient = (ClientDataSource40) wrapped; }
+            else if ( wrapped instanceof ClientConnectionPoolDataSource40 ) {
+                _ccpds = (ClientConnectionPoolDataSource40) wrapped; }
+            else if ( wrapped instanceof ClientXADataSource40 ) {
+                _cxads = (ClientXADataSource40) wrapped; }
+            else { throw nothingWrapped(); }
+        } else {
+            if ( wrapped instanceof NonJNDIEmbeddedDataSource40  ) {
+                _nonJNDIembedded = (NonJNDIEmbeddedDataSource40 ) wrapped; }
+            else if ( wrapped instanceof NonJNDIClientDataSource40 ) {
+                _nonJNDInetclient = (NonJNDIClientDataSource40) wrapped; }
+            else { throw nothingWrapped(); }
+        }
     }
     
     ///////////////////////////////////////////////////////////////////////
@@ -78,13 +97,21 @@ public  class   Wrapper41DataSource
 
     public  Logger    getParentLogger() throws SQLException
     {
-        if ( _embedded != null ) { return _embedded.getParentLogger(); }
-        else if ( _netclient != null ) { return _netclient.getParentLogger(); }
-        else if ( _ecpds != null ) { return _ecpds.getParentLogger(); }
-        else if ( _exads != null ) { return _exads.getParentLogger(); }
-        else if ( _ccpds != null ) { return _ccpds.getParentLogger(); }
-        else if ( _cxads != null ) { return _cxads.getParentLogger(); }
-        else { throw nothingWrapped(); }
+        if (JDBC.vmSupportsJNDI()) {
+            if ( _embedded != null ) {return _embedded.getParentLogger(); }
+            else if (_netclient != null) {return _netclient.getParentLogger();}
+            else if ( _ecpds != null ) {return _ecpds.getParentLogger(); }
+            else if ( _exads != null ) {return _exads.getParentLogger(); }
+            else if ( _ccpds != null ) {return _ccpds.getParentLogger(); }
+            else if ( _cxads != null ) {return _cxads.getParentLogger(); }
+            else { throw nothingWrapped(); }
+        } else {
+            if ( _nonJNDIembedded != null ) {
+                return _nonJNDIembedded.getParentLogger(); }
+            else if ( _nonJNDInetclient != null) {
+                return _nonJNDInetclient.getParentLogger(); }
+            else { throw nothingWrapped(); }
+        }
     }
 
     ///////////////////////////////////////////////////////////////////////
@@ -95,13 +122,19 @@ public  class   Wrapper41DataSource
 
     public CommonDataSource   getWrappedObject() throws SQLException
     {
-        if ( _embedded != null ) { return _embedded; }
-        else if ( _netclient != null ) { return _netclient; }
-        else if ( _ecpds != null ) { return _ecpds; }
-        else if ( _exads != null ) { return _exads; }
-        else if ( _ccpds != null ) { return _ccpds; }
-        else if ( _cxads != null ) { return _cxads; }
-        else { throw nothingWrapped(); }
+        if (JDBC.vmSupportsJNDI()) {
+            if ( _embedded != null ) { return _embedded; }
+            else if ( _netclient != null ) { return _netclient; }
+            else if ( _ecpds != null ) { return _ecpds; }
+            else if ( _exads != null ) { return _exads; }
+            else if ( _ccpds != null ) { return _ccpds; }
+            else if ( _cxads != null ) { return _cxads; }
+            else { throw nothingWrapped(); }
+        } else {
+            if ( _nonJNDIembedded != null ) { return _nonJNDIembedded; }
+            else if ( _nonJNDInetclient != null ) { return _nonJNDInetclient; }
+            else { throw nothingWrapped(); }
+        }
     }
 
     ///////////////////////////////////////////////////////////////////////

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java?rev=1438035&r1=1438034&r2=1438035&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java Thu Jan 24 15:05:34 2013
@@ -30,8 +30,8 @@ import java.sql.Statement;
 import javax.sql.PooledConnection;
 
 import junit.framework.Test;
+import org.apache.derby.jdbc.ClientConnectionPoolDataSourceInterface;
 
-import org.apache.derby.jdbc.ClientConnectionPoolDataSource;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.J2EEDataSource;
 import org.apache.derbyTesting.junit.JDBC;
@@ -50,9 +50,18 @@ public class ClientConnectionPoolDataSou
     /**
      * Verify that handling of the {@code maxStatements} property is working.
      */
-    public void testMaxStatementsProperty() {
-        ClientConnectionPoolDataSource cDs =
-                new ClientConnectionPoolDataSource();
+    public void testMaxStatementsProperty() throws Exception {
+        ClientConnectionPoolDataSourceInterface cDs;
+
+        if (JDBC.vmSupportsJNDI()) {
+            cDs = (ClientConnectionPoolDataSourceInterface)Class.forName(
+                "org.apache.derby.jdbc.ClientConnectionPoolDataSource")
+                    .newInstance();
+        } else {
+            cDs = (ClientConnectionPoolDataSourceInterface)Class.forName(
+                "org.apache.derby.jdbc.NonJNDIClientConnectionPoolDataSource40")
+                    .newInstance();
+        }
         // Check the default value.
         assertEquals("Unexpected default value", 0, cDs.getMaxStatements());
         cDs.setMaxStatements(25);
@@ -79,8 +88,9 @@ public class ClientConnectionPoolDataSou
      */
     public void testGetConnectionNoStatementPooling()
             throws SQLException {
-        ClientConnectionPoolDataSource cDs = (ClientConnectionPoolDataSource)
-                J2EEDataSource.getConnectionPoolDataSource();
+        ClientConnectionPoolDataSourceInterface cDs =
+            (ClientConnectionPoolDataSourceInterface)J2EEDataSource.
+                getConnectionPoolDataSource();
         // Make sure statement pooling is disabled.
         cDs.setMaxStatements(0);
         assertEquals(0, cDs.getMaxStatements());
@@ -95,8 +105,9 @@ public class ClientConnectionPoolDataSou
      */
     public void testGetConnectionWithStatementPooling()
             throws SQLException {
-        ClientConnectionPoolDataSource cDs = (ClientConnectionPoolDataSource)
-                J2EEDataSource.getConnectionPoolDataSource();
+        ClientConnectionPoolDataSourceInterface cDs =
+            (ClientConnectionPoolDataSourceInterface)J2EEDataSource.
+                getConnectionPoolDataSource();
         // Enable statement pooling.
         cDs.setMaxStatements(27);
         assertTrue(cDs.getMaxStatements() > 0);
@@ -109,7 +120,7 @@ public class ClientConnectionPoolDataSou
      * @param cDs data source to get connection from
      * @throws SQLException if a JDBC operation fails
      */
-    private void verifyConnection(ClientConnectionPoolDataSource cDs)
+    private void verifyConnection(ClientConnectionPoolDataSourceInterface cDs)
             throws SQLException {
         J2EEDataSource.setBeanProperty(cDs, "createDatabase", "create");
         PooledConnection pc = cDs.getPooledConnection();

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java?rev=1438035&r1=1438034&r2=1438035&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java Thu Jan 24 15:05:34 2013
@@ -143,9 +143,10 @@ public class DataSourceReferenceTest
      */
     public static Test suite() {
        Test suite;
-       if (JDBC.vmSupportsJSR169()) {
-            // Referenceable is not supported with JSR169
-            suite = new TestSuite("DatasourceTest cannot run with JSR169");
+       if (JDBC.vmSupportsJSR169() || !JDBC.vmSupportsJNDI()) {
+            // Referenceable is not supported with JSR169 or without JNDI
+            suite = new TestSuite(
+                    "DatasourceReferenceTest cannot run with JSR169");
         } else {
             suite = TestConfiguration.defaultSuite(
                                                 DataSourceReferenceTest.class);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceSerializationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceSerializationTest.java?rev=1438035&r1=1438034&r2=1438035&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceSerializationTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceSerializationTest.java Thu Jan 24 15:05:34 2013
@@ -26,21 +26,21 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.ObjectInputStream;
+import java.lang.reflect.Method;
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import javax.naming.Reference;
-import javax.naming.spi.ObjectFactory;
 import javax.sql.DataSource;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.Derby;
+import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.SupportFilesSetup;
 
 /**
  * Makes sure that old serialized data sources can be de-serialized with the
- * current version of the data souce.
+ * current version of the data source.
  * <p>
  * Serialized data source from old versions are expected to be found in
  * <tt>testData/serializedDataSources</tt>, with the following filename
@@ -49,7 +49,7 @@ import org.apache.derbyTesting.junit.Sup
  * <tt>ClientPooledConnectionDataSource-10_1.ser</tt>
  * <p>
  * A separation between JDBC 4.0 specific classes and the other classes is not
- * made.
+ * made before release 10.10.
  * <p>
  * This test should detect the typical incompatible changes in the current
  * data source implementations, for instance deleting a field or changing its
@@ -66,6 +66,9 @@ public class DataSourceSerializationTest
     private static final String VERSION_10_2_2_0 = "10_2_2_0";
     /** Constant for Derby version 10.3.2.1. */
     private static final String VERSION_10_3_2_1 = "10_3_2_1";
+    /** Constant for Derby version 10.10.1.0. */
+    private static final String VERSION_10_10_1_0 = "10_10_1_0";
+    private final String _40Suffix = "40";
 
     public DataSourceSerializationTest(String name) {
         super(name);
@@ -78,11 +81,19 @@ public class DataSourceSerializationTest
      */
     public void serTestEmbeddedDataSource()
             throws Exception {
-        final String EMBEDDED_CLASS = "EmbeddedDataSource";
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_0_2_1);
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_1_3_1);
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_2_2_0);
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_3_2_1);
+        if (JDBC.vmSupportsJNDI()) {
+            final String EMBEDDED_CLASS = "EmbeddedDataSource";
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_0_2_1, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_1_3_1, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_2_2_0, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_3_2_1, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_10_1_0, true);
+            deSerializeDs(EMBEDDED_CLASS + _40Suffix, VERSION_10_10_1_0, true);
+        }
+        
+        final String EMBEDDED_CLASS = "NonJNDIEmbeddedDataSource40";
+        deSerializeDs(EMBEDDED_CLASS, VERSION_10_10_1_0, false);
+        
     }
 
     /**
@@ -92,11 +103,19 @@ public class DataSourceSerializationTest
      */
     public void serTestEmbeddedConnectionPoolDataSource()
             throws Exception {
-        final String EMBEDDED_CLASS = "EmbeddedConnectionPoolDataSource";
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_0_2_1);
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_1_3_1);
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_2_2_0);
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_3_2_1);
+        if (JDBC.vmSupportsJNDI()) {
+            final String EMBEDDED_CLASS = "EmbeddedConnectionPoolDataSource";
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_0_2_1, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_1_3_1, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_2_2_0, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_3_2_1, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_10_1_0, true);
+            deSerializeDs(EMBEDDED_CLASS + _40Suffix, VERSION_10_10_1_0, true);
+        }
+
+        final String EMBEDDED_CLASS =
+                "NonJNDIEmbeddedConnectionPoolDataSource40";
+        deSerializeDs(EMBEDDED_CLASS, VERSION_10_10_1_0, false);
     }
 
     /**
@@ -106,11 +125,18 @@ public class DataSourceSerializationTest
      */
     public void serTestEmbeddedXADataSource()
             throws Exception {
-        final String EMBEDDED_CLASS = "EmbeddedXADataSource";
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_0_2_1);
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_1_3_1);
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_2_2_0);
-        deSerializeDs(EMBEDDED_CLASS, VERSION_10_3_2_1);
+        if (JDBC.vmSupportsJNDI()) {
+            final String EMBEDDED_CLASS = "EmbeddedXADataSource";
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_0_2_1, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_1_3_1, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_2_2_0, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_3_2_1, true);
+            deSerializeDs(EMBEDDED_CLASS, VERSION_10_10_1_0, true);
+            deSerializeDs(EMBEDDED_CLASS + _40Suffix, VERSION_10_10_1_0, true);
+        }
+        
+        final String EMBEDDED_CLASS = "NonJNDIEmbeddedXADataSource40";
+        deSerializeDs(EMBEDDED_CLASS, VERSION_10_10_1_0, false);
     }
 
     /**
@@ -120,11 +146,18 @@ public class DataSourceSerializationTest
      */
     public void serTestClientDataSource()
             throws Exception {
-        final String CLIENT_CLASS = "ClientDataSource";
-        // No client driver for Derby 10.0
-        deSerializeDs(CLIENT_CLASS, VERSION_10_1_3_1);
-        deSerializeDs(CLIENT_CLASS, VERSION_10_2_2_0);
-        deSerializeDs(CLIENT_CLASS, VERSION_10_3_2_1);
+        if (JDBC.vmSupportsJNDI()) {
+            final String CLIENT_CLASS = "ClientDataSource";
+            // No client driver for Derby 10.0
+            deSerializeDs(CLIENT_CLASS, VERSION_10_1_3_1, true);
+            deSerializeDs(CLIENT_CLASS, VERSION_10_2_2_0, true);
+            deSerializeDs(CLIENT_CLASS, VERSION_10_3_2_1, true);
+            deSerializeDs(CLIENT_CLASS, VERSION_10_10_1_0, true);
+            deSerializeDs(CLIENT_CLASS + _40Suffix, VERSION_10_10_1_0, true);
+        }
+        
+        final String CLIENT_CLASS = "NonJNDIClientDataSource40";
+        deSerializeDs(CLIENT_CLASS, VERSION_10_10_1_0, false);
     }
 
     /**
@@ -134,11 +167,18 @@ public class DataSourceSerializationTest
      */
     public void serTestClientConnectionPoolDataSource()
             throws Exception {
-        final String CLIENT_CLASS = "ClientConnectionPoolDataSource";
-        // No client driver for Derby 10.0
-        deSerializeDs(CLIENT_CLASS, VERSION_10_1_3_1);
-        deSerializeDs(CLIENT_CLASS, VERSION_10_2_2_0);
-        deSerializeDs(CLIENT_CLASS, VERSION_10_3_2_1);
+        if (JDBC.vmSupportsJNDI()) {
+            final String CLIENT_CLASS = "ClientConnectionPoolDataSource";
+            // No client driver for Derby 10.0
+            deSerializeDs(CLIENT_CLASS, VERSION_10_1_3_1, true);
+            deSerializeDs(CLIENT_CLASS, VERSION_10_2_2_0, true);
+            deSerializeDs(CLIENT_CLASS, VERSION_10_3_2_1, true);
+            deSerializeDs(CLIENT_CLASS, VERSION_10_10_1_0, true);
+            deSerializeDs(CLIENT_CLASS + _40Suffix, VERSION_10_10_1_0, true);
+        }
+         
+        final String CLIENT_CLASS = "NonJNDIClientConnectionPoolDataSource40";
+        deSerializeDs(CLIENT_CLASS, VERSION_10_10_1_0, false);
     }
 
     /**
@@ -148,11 +188,18 @@ public class DataSourceSerializationTest
      */
     public void serTestClientXADataSource()
             throws Exception {
-        final String CLIENT_CLASS = "ClientXADataSource";
-        // No client driver for Derby 10.0
-        deSerializeDs(CLIENT_CLASS, VERSION_10_1_3_1);
-        deSerializeDs(CLIENT_CLASS, VERSION_10_2_2_0);
-        deSerializeDs(CLIENT_CLASS, VERSION_10_3_2_1);
+        if (JDBC.vmSupportsJNDI()) {
+            final String CLIENT_CLASS = "ClientXADataSource";
+            // No client driver for Derby 10.0
+            deSerializeDs(CLIENT_CLASS, VERSION_10_1_3_1, true);
+            deSerializeDs(CLIENT_CLASS, VERSION_10_2_2_0, true);
+            deSerializeDs(CLIENT_CLASS, VERSION_10_3_2_1, true);
+            deSerializeDs(CLIENT_CLASS, VERSION_10_10_1_0, true);
+            deSerializeDs(CLIENT_CLASS + _40Suffix, VERSION_10_10_1_0, true);
+        }
+         
+        final String CLIENT_CLASS = "NonJNDIClientXADataSource40";
+        deSerializeDs(CLIENT_CLASS, VERSION_10_10_1_0, false);
     }
 
     /**
@@ -172,8 +219,15 @@ public class DataSourceSerializationTest
      *
      * @throws Exception on a number of error conditions
      */
-    private void deSerializeDs(String className, String version)
+    private void deSerializeDs(
+            String className, String version, boolean dsHasJNDI)
             throws Exception {
+
+        if (!JDBC.vmSupportsJDBC4() && className.contains("40")) {
+            // Running old Java, bail out if JDBC4
+            return;
+        }
+
         // Construct the filename
         final StringBuffer fname = new StringBuffer(className);
         fname.append('-');
@@ -198,7 +252,7 @@ public class DataSourceSerializationTest
         assertNotNull("FileInputStream is null", is);
         Object dsObj = null;
         DataSource ds = null;
-        Reference dsRef = null;
+        Object dsRef = null;
         // Used to preserve original error information in case of exception when 
         // closing the input stream.
         boolean testSequencePassed = false;
@@ -220,8 +274,10 @@ public class DataSourceSerializationTest
             ds.setLoginTimeout(newTimeout);
             assertEquals(newTimeout, ds.getLoginTimeout());
 
-            // Recreate the data source using reference.
-            dsRef = (Reference)ois.readObject();
+            if (dsHasJNDI) {
+                // Recreate the data source using reference.
+                dsRef = ois.readObject();
+            }
             ois.close();
             testSequencePassed = true;
         } finally {
@@ -236,15 +292,34 @@ public class DataSourceSerializationTest
             }
         }
 
-        String factoryClassName = dsRef.getFactoryClassName();
-        ObjectFactory factory =
-            (ObjectFactory)Class.forName(factoryClassName).newInstance();
-        Object recreatedDs =
-            factory.getObjectInstance(dsRef, null, null, null);
-        ds = (DataSource)recreatedDs;
-        assertTrue("Unexpected class instantiated by Reference: " +
-                dsObj.getClass().getName(),
-                dsObj.getClass().getName().indexOf(className) > 0);
+        if (dsHasJNDI) {
+            // Recreate ds via the Reference's factory class.  We use
+            // reflection here to make the test runnable for non JNDI
+            // environments. (Even though this code would not be executed in
+            // that environment, the VM will try to load the classes if
+            // reference directly in the source. So, resort to reflection...)
+            Method getFactoryClassName =
+                    Class.forName("javax.naming.Reference").getMethod(
+                    "getFactoryClassName", null);
+            String factoryClassName =
+                    (String)getFactoryClassName.invoke(dsRef, null);
+            Object factory =
+                    Class.forName(factoryClassName).newInstance();
+            Method getObjectInstance =
+                    factory.getClass().getMethod("getObjectInstance",
+                    new Class[] {
+                        Class.forName("java.lang.Object"),
+                        Class.forName("javax.naming.Name"),
+                        Class.forName("javax.naming.Context"),
+                        Class.forName( "java.util.Hashtable")});
+            Object recreatedDs =
+                    getObjectInstance.invoke(
+                    factory, new Object[] {dsRef, null, null, null});
+            ds = (DataSource)recreatedDs;
+            assertTrue("Unexpected class instantiated by Reference: " +
+                    dsObj.getClass().getName(),
+                    dsObj.getClass().getName().indexOf(className) > 0);
+        }
     }
 
     /**
@@ -304,6 +379,28 @@ public class DataSourceSerializationTest
                 filePrefix + "ClientDataSource-10_3_2_1.ser",
                 filePrefix + "ClientConnectionPoolDataSource-10_3_2_1.ser",
                 filePrefix + "ClientXADataSource-10_3_2_1.ser",
+
+                // 10.10 resources
+                filePrefix + "EmbeddedDataSource-10_10_1_0.ser",
+                filePrefix + "EmbeddedDataSource40-10_10_1_0.ser",
+                filePrefix + "EmbeddedConnectionPoolDataSource-10_10_1_0.ser",
+                filePrefix + "EmbeddedConnectionPoolDataSource40-10_10_1_0.ser",
+                filePrefix + "EmbeddedXADataSource-10_10_1_0.ser",
+                filePrefix + "EmbeddedXADataSource40-10_10_1_0.ser",
+                filePrefix + "ClientDataSource-10_10_1_0.ser",
+                filePrefix + "ClientDataSource40-10_10_1_0.ser",
+                filePrefix + "ClientConnectionPoolDataSource-10_10_1_0.ser",
+                filePrefix + "ClientConnectionPoolDataSource40-10_10_1_0.ser",
+                filePrefix + "ClientXADataSource-10_10_1_0.ser",
+                filePrefix + "ClientXADataSource40-10_10_1_0.ser",
+                filePrefix + "NonJNDIEmbeddedDataSource40-10_10_1_0.ser",
+                filePrefix +
+                    "NonJNDIEmbeddedConnectionPoolDataSource40-10_10_1_0.ser",
+                filePrefix + "NonJNDIEmbeddedXADataSource40-10_10_1_0.ser",
+                filePrefix + "NonJNDIClientDataSource40-10_10_1_0.ser",
+                filePrefix +
+                    "NonJNDIClientConnectionPoolDataSource40-10_10_1_0.ser",
+                filePrefix + "NonJNDIClientXADataSource40-10_10_1_0.ser",
             });
     }
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java?rev=1438035&r1=1438034&r2=1438035&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java Thu Jan 24 15:05:34 2013
@@ -28,15 +28,11 @@ import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
-import java.util.HashMap;
 import java.util.Hashtable;
 import javax.sql.DataSource;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
-import org.apache.derby.jdbc.ClientDataSource;
-import org.apache.derby.jdbc.EmbeddedDataSource;
+import org.apache.derby.jdbc.ClientDataSourceInterface;
 import org.apache.derby.jdbc.EmbeddedSimpleDataSource;
 import org.apache.derby.jdbc.NonJNDIEmbeddedDataSource40;
 import org.apache.derbyTesting.functionTests.util.SecurityCheck;
@@ -267,11 +263,22 @@ public class DataSourceTest extends Base
      * 
      * @throws SQLException
      */
-    public void testClientDSConnectionAttributes() throws SQLException {
+    public void testClientDSConnectionAttributes() throws Exception {
         if (usingEmbedded())
             return;
         
-        ClientDataSource ds = new ClientDataSource();
+        ClientDataSourceInterface ds = null;
+
+        if (JDBC.vmSupportsJNDI()) {
+            // Use reflection to avoid class not found in non-JNDI context
+            ds = (ClientDataSourceInterface)Class.forName(
+                    "org.apache.derby.jdbc.ClientDataSource").newInstance();
+        } else {
+            ds = (ClientDataSourceInterface)Class.forName(
+                    "org.apache.derby.jdbc.NonJNDIClientDataSource40").
+                    newInstance();
+        }
+
         ds.setPortNumber(TestConfiguration.getCurrent().getPort());
         
         // DataSource - EMPTY; expect error 08001 in all cases
@@ -433,7 +440,7 @@ public class DataSourceTest extends Base
      * 
      * @throws SQLException
      */
-    public void testClientMessageTextConnectionAttribute() throws SQLException
+    public void testClientMessageTextConnectionAttribute() throws Exception
     {
         if (usingEmbedded())
             return;
@@ -443,7 +450,17 @@ public class DataSourceTest extends Base
 
         // DataSource
         // DataSource - retrieveMessageTextProperty
-        ClientDataSource ds = new ClientDataSource();
+        ClientDataSourceInterface ds = null;
+
+        if (JDBC.vmSupportsJNDI()) {
+            // Use reflection to avoid class not found in non-JNDI context
+            ds = (ClientDataSourceInterface)Class.forName(
+              "org.apache.derby.jdbc.ClientDataSource").newInstance();
+        } else {
+            ds = (ClientDataSourceInterface)Class.forName(
+              "org.apache.derby.jdbc.NonJNDIClientDataSource40").newInstance();
+        }
+
         ds.setPortNumber(TestConfiguration.getCurrent().getPort());
         ds.setDatabaseName(dbName);
         ds.setConnectionAttributes(retrieveMessageTextProperty + "=false");

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InvalidLDAPServerAuthenticationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InvalidLDAPServerAuthenticationTest.java?rev=1438035&r1=1438034&r2=1438035&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InvalidLDAPServerAuthenticationTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InvalidLDAPServerAuthenticationTest.java Thu Jan 24 15:05:34 2013
@@ -110,32 +110,48 @@ public class InvalidLDAPServerAuthentica
         // actual test. 
         // first, try datasource connection
         DataSource ds = JDBCDataSource.getDataSource(dbName);
+
         try {
             ds.getConnection();
             fail("expected java.net.UnknownHostException for datasource");
         } catch (SQLException se) {
-            assertSQLState("08004", se);
-            // with network server, the java.net.UnknownHostException will be in 
-            // derby.log, the client only gets a 08004 and somewhat misleading
-            // warning ('Reason: userid or password invalid')
-            println( "Saw SQLException with message = " + se.getMessage() );
-            if (usingEmbedded())
-            {
-                assertTrue(se.getMessage().indexOf("java.net.UnknownHostException")>1);
+            if (JDBC.vmSupportsJNDI()) {
+                assertSQLState("08004", se);
+                // with network server, the java.net.UnknownHostException will
+                // be in derby.log, the client only gets a 08004 and somewhat
+                // misleading warning ('Reason: userid or password invalid')
+                println( "Saw SQLException with message = " + se.getMessage() );
+
+                if (usingEmbedded()) {
+                    assertTrue(se.getMessage().
+                               indexOf("java.net.UnknownHostException") > 1);
+                }
+            } else {
+                // Expect boot to fail, LDAP authentication requires JNDI
+                assertSQLState("XJ040", se);
             }
         }
+
         // driver manager connection
         String url2 = TestConfiguration.getCurrent().getJDBCUrl(dbName);
+
         try {
             DriverManager.getConnection(url2,"user","password").close();
             fail("expected java.net.UnknownHostException for driver");
         } catch (SQLException se) {
-            assertSQLState("08004", se);
-            // with network server, the java.net.UnknownHostException will be in 
-            // derby.log, the client only gets a 08004 and somewhat misleading
-            // warning ('Reason: userid or password invalid')
-            if (usingEmbedded())
-                assertTrue(se.getMessage().indexOf("java.net.UnknownHostException")>1);
+            if (JDBC.vmSupportsJNDI()) {
+                assertSQLState("08004", se);
+                // with network server, the java.net.UnknownHostException will
+                // be in derby.log, the client only gets a 08004 and somewhat
+                // misleading warning ('Reason: userid or password invalid')
+                if (usingEmbedded()) {
+                    assertTrue(se.getMessage().
+                               indexOf("java.net.UnknownHostException") > 1);
+                }
+            } else {
+                // Expect boot to fail, LDAP authentication requires JNDI
+                assertSQLState("XJ040", se);
+            }
         }
         
         // we need to shutdown the system, or the failed connections

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java?rev=1438035&r1=1438034&r2=1438035&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java Thu Jan 24 15:05:34 2013
@@ -53,9 +53,9 @@ import javax.transaction.xa.Xid;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.derby.jdbc.ClientBaseDataSourceRoot;
-import org.apache.derby.jdbc.ClientConnectionPoolDataSource;
-import org.apache.derby.jdbc.ClientXADataSource;
+import org.apache.derby.jdbc.ClientConnectionPoolDataSourceInterface;
+import org.apache.derby.jdbc.ClientDataSourceInterface;
+import org.apache.derby.jdbc.ClientXADataSourceInterface;
 import org.apache.derby.jdbc.EmbeddedSimpleDataSource;
 import org.apache.derbyTesting.functionTests.util.PrivilegedFileOpsForTests;
 import org.apache.derbyTesting.functionTests.util.SecurityCheck;
@@ -2344,8 +2344,8 @@ public class J2EEDataSourceTest extends 
             throws IOException, SQLException {
         final int extraInvokations = invokeExtra ? 25 : 0;
         final int rowCount = 10;
-        final boolean isXA = ds instanceof ClientXADataSource;
-        final boolean isCP = ds instanceof ClientConnectionPoolDataSource;
+        final boolean isXA = ds instanceof XADataSource;
+        final boolean isCP = ds instanceof ConnectionPoolDataSource;
         // Generate trace file name and define trace behavior.
         String dsType = (isXA ? "xa_" : (isCP ? "cp_" : ""));
         String tbl = "ds_" + dsType +
@@ -2356,7 +2356,7 @@ public class J2EEDataSourceTest extends 
                 PrivilegedFileOpsForTests.getAbsolutePath(traceFile));
         J2EEDataSource.setBeanProperty(ds, "traceFileAppend", Boolean.FALSE);
         J2EEDataSource.setBeanProperty( ds, "traceLevel",
-                new Integer(ClientBaseDataSourceRoot.TRACE_ALL));
+                new Integer(ClientDataSourceInterface.TRACE_ALL));
 
         // Obtain connection.
         PooledConnection physicalCon = null;
@@ -2365,7 +2365,7 @@ public class J2EEDataSourceTest extends 
             physicalCon = ((XADataSource)ds).getXAConnection();
             con = physicalCon.getConnection();
         } else if (isCP) {
-            physicalCon = ((ClientConnectionPoolDataSource)ds).
+            physicalCon = ((ClientConnectionPoolDataSourceInterface)ds).
                     getPooledConnection();
             con = physicalCon.getConnection();
         } else {
@@ -2723,28 +2723,40 @@ public class J2EEDataSourceTest extends 
      * 
      * @throws SQLException
      */
-    public void testClientDSConnectionAttributes() throws SQLException {
+    public void testClientDSConnectionAttributes()
+            throws SQLException, ClassNotFoundException,
+            IllegalAccessException, InstantiationException {
         if (usingEmbedded())
             return;
 
         // now with ConnectionPoolDataSource
-        ClientConnectionPoolDataSource cpds = 
-            new ClientConnectionPoolDataSource();
+        ClientConnectionPoolDataSourceInterface cpds;
+
+        if (JDBC.vmSupportsJNDI()) {
+            cpds = (ClientConnectionPoolDataSourceInterface)Class.forName(
+               "org.apache.derby.jdbc.ClientConnectionPoolDataSource").
+                    newInstance();
+        } else {
+            cpds = (ClientConnectionPoolDataSourceInterface)Class.forName(
+               "org.apache.derby.jdbc.NonJNDIClientConnectionPoolDataSource40").
+                    newInstance();
+        }
+
         cpds.setPortNumber(TestConfiguration.getCurrent().getPort());
         
         // ConnectionPoolDataSource - EMPTY
-        dsConnectionRequests(new String[]  
+        dsCPConnectionRequests(new String[]
             {"08001","08001","08001","08001",
              "08001","08001","08001","08001","08001"}, 
-            (ConnectionPoolDataSource)cpds);
+            cpds);
 
         // ConnectionPoolDataSource 
         // - connectionAttributes=databaseName=<valid dbname>
         cpds.setConnectionAttributes("databaseName=" + dbName);
-        dsConnectionRequests(new String[]  
+        dsCPConnectionRequests(new String[]
             {"08001","08001","08001","08001",
              "08001","08001","08001","08001","08001"},
-            (ConnectionPoolDataSource)cpds);
+            cpds);
         cpds.setConnectionAttributes(null);
 
         // Test that database name specified in connection attributes is 
@@ -2753,29 +2765,39 @@ public class J2EEDataSourceTest extends 
         // connectionAttributes=databaseName=kangaroo
         cpds.setConnectionAttributes("databaseName=kangaroo");
         cpds.setDatabaseName(dbName);
-        dsConnectionRequests(new String[]  
+        dsCPConnectionRequests(new String[]
             {"OK","08001","OK","OK","08001","08001","OK","OK","OK"},
-            (ConnectionPoolDataSource)cpds);
+            cpds);
         cpds.setConnectionAttributes(null);
         cpds.setDatabaseName(null);
 
         // now with XADataSource
-        ClientXADataSource xads = new ClientXADataSource();
+        ClientXADataSourceInterface xads;
         
+        if (JDBC.vmSupportsJNDI()) {
+            xads = (ClientXADataSourceInterface)Class.forName(
+                "org.apache.derby.jdbc.ClientXADataSource").
+                    newInstance();
+        } else {
+            xads = (ClientXADataSourceInterface)Class.forName(
+                "org.apache.derby.jdbc.NonJNDIClientXADataSource40").
+                    newInstance();
+        }
+
         xads.setPortNumber(TestConfiguration.getCurrent().getPort());
         
         // XADataSource - EMPTY
-        dsConnectionRequests(new String[]  
+        dsXAConnectionRequests(new String[]
             {"08001","08001","08001","08001",
              "08001","08001","08001","08001","08001"}, 
-            (XADataSource) xads);
+            xads);
 
         // XADataSource - connectionAttributes=databaseName=<valid dbname>
         xads.setConnectionAttributes("databaseName=wombat");
-        dsConnectionRequests(new String[]  
+        dsXAConnectionRequests(new String[]
             {"08001","08001","08001","08001",
              "08001","08001","08001","08001","08001"},
-            (XADataSource) xads);
+            xads);
         xads.setConnectionAttributes(null);
 
         // Test that database name specified in connection attributes is not used
@@ -2783,9 +2805,9 @@ public class J2EEDataSourceTest extends 
         // connectionAttributes=databaseName=kangaroo
         xads.setConnectionAttributes("databaseName=kangaroo");
         xads.setDatabaseName("wombat");
-        dsConnectionRequests(new String[]  
+        dsXAConnectionRequests(new String[]
             {"OK","08001","OK","OK","08001","08001","OK","OK","OK"},
-            (XADataSource) xads);
+            xads);
         xads.setConnectionAttributes(null);
         xads.setDatabaseName(null);
     } // End testClientDSConnectionAttributes
@@ -2872,26 +2894,26 @@ public class J2EEDataSourceTest extends 
               (ConnectionPoolDataSource) Class.forName(cpdsName).newInstance();
 
         // ConnectionPoolDataSource - EMPTY
-        dsConnectionRequests(new String[] {  
+        dsCPConnectionRequests(new String[] {
             "XJ004","XJ004","XJ004","XJ004",
             "XJ004","XJ004","XJ004","XJ004","XJ004"},
-            (ConnectionPoolDataSource)cpds);
+            cpds);
 
         // ConnectionPoolDataSource - 
         // connectionAttributes=databaseName=wombat
         JDBCDataSource.setBeanProperty(cpds, "connectionAttributes", "databaseName=" + dbName);
-        dsConnectionRequests(new String[] {  
+        dsCPConnectionRequests(new String[] {
             "XJ004","XJ004","XJ004","XJ004",
             "XJ004","XJ004","XJ004","XJ004","XJ004"},
-            (ConnectionPoolDataSource)cpds);
+            cpds);
         JDBCDataSource.clearStringBeanProperty(cpds, "connectionAttributes");
 
         // ConnectionPoolDataSource - attributesAsPassword=true
         JDBCDataSource.setBeanProperty(cpds, "attributesAsPassword", Boolean.TRUE);
-        dsConnectionRequests(new String[] {  
+        dsCPConnectionRequests(new String[] {
             "XJ004","XJ004","XJ004","XJ028",
             "XJ028","XJ004","XJ004","XJ004","XJ004"},
-            (ConnectionPoolDataSource)cpds);
+            cpds);
         JDBCDataSource.setBeanProperty(cpds, "attributesAsPassword", Boolean.FALSE);
         
         // ensure the DS property password is not treated as a set of
@@ -2901,10 +2923,10 @@ public class J2EEDataSourceTest extends 
         JDBCDataSource.setBeanProperty(cpds, "attributesAsPassword", Boolean.TRUE);
         JDBCDataSource.setBeanProperty(cpds, "user", "fred");
         JDBCDataSource.setBeanProperty(cpds, "password", "databaseName=" + dbName + ";password=wilma");
-        dsConnectionRequests(new String[] {  
+        dsCPConnectionRequests(new String[] {
             "XJ004","XJ004","XJ004","XJ028",
             "XJ028","XJ004","XJ004","XJ004","XJ004"},
-            (ConnectionPoolDataSource)cpds);
+            cpds);
         JDBCDataSource.setBeanProperty(cpds, "attributesAsPassword", Boolean.FALSE);
         JDBCDataSource.clearStringBeanProperty(cpds, "user");
         JDBCDataSource.clearStringBeanProperty(cpds, "password");
@@ -2917,42 +2939,42 @@ public class J2EEDataSourceTest extends 
                 (XADataSource) Class.forName(xadsName).newInstance();
 
         // XADataSource - EMPTY
-        dsConnectionRequests(new String[] {  
+        dsXAConnectionRequests(new String[] {
             "08006","08006","08006","08006",
             "08006","08006","08006","08006","08006"},
-            (XADataSource) xads);
+            xads);
 
         // XADataSource - databaseName=wombat
         JDBCDataSource.setBeanProperty(xads, "databaseName", dbName);
-        dsConnectionRequests(new String[] {  
+        dsXAConnectionRequests(new String[] {
             "08004","08004","08004","OK",
             "08004","08004","08004","08004","08004"},
-            (XADataSource) xads);
+            xads);
         JDBCDataSource.clearStringBeanProperty(xads, "databaseName");
 
         // XADataSource - connectionAttributes=databaseName=wombat");
         JDBCDataSource.setBeanProperty(xads, "connectionAttributes", "databaseName=" + dbName);
-        dsConnectionRequests(new String[] {  
+        dsXAConnectionRequests(new String[] {
             "08006","08006","08006","08006",
             "08006","08006","08006","08006","08006"},
-            (XADataSource) xads);
+            xads);
         JDBCDataSource.clearStringBeanProperty(xads, "connectionAttributes");
 
         // XADataSource - attributesAsPassword=true
         JDBCDataSource.setBeanProperty(xads, "attributesAsPassword", Boolean.TRUE);
-        dsConnectionRequests(new String[] {  
+        dsXAConnectionRequests(new String[] {
             "08006","08006","08006","08006",
             "08006","08006","08006","08006","08006"},
-            (XADataSource) xads);
+            xads);
         JDBCDataSource.setBeanProperty(xads, "attributesAsPassword", Boolean.FALSE);
 
         // XADataSource - databaseName=wombat, attributesAsPassword=true
         JDBCDataSource.setBeanProperty(xads, "databaseName", dbName);
         JDBCDataSource.setBeanProperty(xads, "attributesAsPassword", Boolean.TRUE);
-        dsConnectionRequests(new String[] {  
+        dsXAConnectionRequests(new String[] {
             "08004","08004","08004","XJ028",
             "XJ028","08004","08004","OK","08004"},
-            (XADataSource) xads);
+            xads);
         JDBCDataSource.setBeanProperty(xads, "attributesAsPassword", Boolean.FALSE);
         JDBCDataSource.clearStringBeanProperty(xads, "databaseName");
         
@@ -3039,12 +3061,25 @@ public class J2EEDataSourceTest extends 
      *  
      * @throws SQLException
      */
-    public void testClientMessageTextConnectionAttribute() throws SQLException
+    public void testClientMessageTextConnectionAttribute()
+            throws SQLException, ClassNotFoundException, IllegalAccessException,
+            InstantiationException
     {
         String retrieveMessageTextProperty = "retrieveMessageText";
         // with ConnectionPoolDataSource
         // ConnectionPoolDataSource - retrieveMessageTextProperty
-        ClientConnectionPoolDataSource cpds = new ClientConnectionPoolDataSource();
+        ClientConnectionPoolDataSourceInterface cpds;
+
+        if (JDBC.vmSupportsJNDI()) {
+            cpds = (ClientConnectionPoolDataSourceInterface)Class.forName(
+               "org.apache.derby.jdbc.ClientConnectionPoolDataSource").
+                    newInstance();
+        } else {
+            cpds = (ClientConnectionPoolDataSourceInterface)Class.forName(
+               "org.apache.derby.jdbc.NonJNDIClientConnectionPoolDataSource40").
+                    newInstance();
+        }
+
         cpds.setPortNumber(TestConfiguration.getCurrent().getPort());
         
         cpds.setDatabaseName(dbName);
@@ -3061,7 +3096,16 @@ public class J2EEDataSourceTest extends 
         cpConn.close();
 
         // now with XADataSource
-        ClientXADataSource xads = new ClientXADataSource();
+        ClientXADataSourceInterface xads;
+        if (JDBC.vmSupportsJNDI()) {
+            xads = (ClientXADataSourceInterface)Class.forName(
+                "org.apache.derby.jdbc.ClientXADataSource").
+                    newInstance();
+        } else {
+            xads = (ClientXADataSourceInterface)Class.forName(
+                "org.apache.derby.jdbc.NonJNDIClientXADataSource40").
+                    newInstance();
+        }
         //XADataSource - retrieveMessageTextProperty
         xads.setPortNumber(TestConfiguration.getCurrent().getPort());
         xads.setDatabaseName(dbName);
@@ -3849,7 +3893,7 @@ public class J2EEDataSourceTest extends 
         }
     }
     
-    private static void dsConnectionRequests(
+    private static void dsCPConnectionRequests(
         String[] expectedValues, ConnectionPoolDataSource ds) {
         try {
             ds.getPooledConnection();
@@ -3885,7 +3929,7 @@ public class J2EEDataSourceTest extends 
         }
     }
         
-    private static void dsConnectionRequests(
+    private static void dsXAConnectionRequests(
         String[] expectedValues, XADataSource ds) {
         try {
             ds.getXAConnection();

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java?rev=1438035&r1=1438034&r2=1438035&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java Thu Jan 24 15:05:34 2013
@@ -31,10 +31,11 @@ import java.util.Properties;
 
 import java.sql.*;
 import java.io.*;
-import org.apache.derby.jdbc.ClientDataSource;
+import org.apache.derby.jdbc.ClientDataSourceInterface;
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.BaseTestCase;
+import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.NetworkServerTestSetup;
 import org.apache.derbyTesting.junit.TestConfiguration;
 
@@ -400,7 +401,11 @@ public class ReplicationRun extends Base
         Thread.sleep(waitTime); // .... until stable...
         try
         {
-            ClientDataSource ds = configureDataSource( fullDbPath, serverHost, serverPort, useEncryption(false) );
+            ClientDataSourceInterface ds = configureDataSource(
+                    fullDbPath,
+                    serverHost,
+                    serverPort,
+                    useEncryption(false) );
             Connection conn = ds.getConnection();
             conn.close();
         }
@@ -425,7 +430,8 @@ public class ReplicationRun extends Base
         {
             try
             {
-                ClientDataSource ds = configureDataSource( fullDbPath, serverHost, serverPort, useEncryption(false) );
+                ClientDataSourceInterface ds = configureDataSource(
+                    fullDbPath, serverHost, serverPort, useEncryption(false) );
                 Connection conn = ds.getConnection();
                 util.DEBUG("Wait Got connection after " 
                         + (count-1) +" * "+ sleepTime + " ms.");
@@ -457,7 +463,11 @@ public class ReplicationRun extends Base
         {
             try
             {
-                ClientDataSource ds = configureDataSource( fullDbPath, serverHost, serverPort, useEncryption(false) );
+                ClientDataSourceInterface ds = configureDataSource(
+                        fullDbPath,
+                        serverHost,
+                        serverPort,
+                        useEncryption(false) );
                 Connection conn = ds.getConnection();
                 // Should never get here!
                 conn.close();
@@ -1003,7 +1013,7 @@ public class ReplicationRun extends Base
                         +";slaveHost="+slaveReplInterface
                         +";slavePort="+slaveReplPort
                         +useEncryption(false);
-                    ClientDataSource ds = configureDataSource
+                    ClientDataSourceInterface ds = configureDataSource
                         ( masterDbPath( dbName ), masterHost, masterServerPort, connectionAttributes );
                     conn = ds.getConnection();
                     
@@ -1192,7 +1202,8 @@ public class ReplicationRun extends Base
                         Class.forName(DRIVER_CLASS_NAME); // Needed when running from classes!
                         conn = DriverManager.getConnection(URL);
                          */
-                        ClientDataSource ds = configureDataSource( fDbPath, fSlaveHost, fSlaveServerPort, fConnAttrs );
+                        ClientDataSourceInterface ds = configureDataSource(
+                            fDbPath, fSlaveHost, fSlaveServerPort, fConnAttrs );
                         conn = ds.getConnection();
                         conn.close();
                     }
@@ -1351,7 +1362,7 @@ public class ReplicationRun extends Base
             // return;
         }
 
-        ClientDataSource ds = configureDataSource
+        ClientDataSourceInterface ds = configureDataSource
             ( slaveDbPath( replicatedDb ), slaveServerHost, slaveServerPort, useEncryption(false) );
         Connection conn = ds.getConnection();
             
@@ -1381,7 +1392,7 @@ public class ReplicationRun extends Base
             // return;
         }
 
-        ClientDataSource ds = configureDataSource
+        ClientDataSourceInterface ds = configureDataSource
             ( masterDbPath( replicatedDb ), masterServerHost, masterServerPort, useEncryption(false) );
         Connection conn = ds.getConnection();
             
@@ -2770,11 +2781,13 @@ test.postStoppedSlaveServer.return=true
             int serverPort,
             String dbPath,
             int _noTuplesToInsert)
-        throws SQLException
+        throws SQLException, ClassNotFoundException, IllegalAccessException,
+            InstantiationException
     {
         util.DEBUG("_testInsertUpdateDeleteOnMaster: " + serverHost + ":" +
                    serverPort + "/" + dbPath + " " + _noTuplesToInsert);
-        ClientDataSource ds = configureDataSource( dbPath, serverHost, serverPort, useEncryption(false) );
+        ClientDataSourceInterface ds = configureDataSource(
+                dbPath, serverHost, serverPort, useEncryption(false) );
         Connection conn = ds.getConnection();
         
         PreparedStatement ps = conn.prepareStatement("create table t(i integer primary key, s varchar(64))");
@@ -2798,10 +2811,12 @@ test.postStoppedSlaveServer.return=true
             int serverPort,
             String dbPath,
             int _noTuplesInserted)
-        throws SQLException
+        throws SQLException, ClassNotFoundException, IllegalAccessException,
+               InstantiationException
     {
         util.DEBUG("_verifyDatabase: "+serverHost+":"+serverPort+"/"+dbPath);
-        ClientDataSource ds = configureDataSource( dbPath, serverHost, serverPort, useEncryption(false) );
+        ClientDataSourceInterface ds = configureDataSource(
+                dbPath, serverHost, serverPort, useEncryption(false) );
         Connection conn = ds.getConnection();
         
         _verify(conn,_noTuplesInserted);
@@ -3019,15 +3034,26 @@ test.postStoppedSlaveServer.return=true
      * Set up a data source.
      * </p>
      */
-    ClientDataSource    configureDataSource
+    ClientDataSourceInterface    configureDataSource
         (
          String dbName,
          String serverHost,
          int        serverPort,
          String     connectionAttributes
-         )
+         ) throws ClassNotFoundException, IllegalAccessException,
+             InstantiationException
     {
-        ClientDataSource ds = new org.apache.derby.jdbc.ClientDataSource();
+        ClientDataSourceInterface ds;
+
+        if (JDBC.vmSupportsJNDI()) {
+            ds = (ClientDataSourceInterface)Class.forName(
+                "org.apache.derby.jdbc.ClientDataSource").
+                    newInstance();
+        } else {
+            ds = (ClientDataSourceInterface)Class.forName(
+                "org.apache.derby.jdbc.NonJNDIClientDataSource40").
+                    newInstance();
+        }
 
         ds.setDatabaseName( dbName );
         ds.setServerName( serverHost );



Mime
View raw message