IllegalAccessException, InstantiationException {
if (usingEmbedded())
return;
// now with ConnectionPoolDataSource
ClientConnectionPoolDataSourceInterface cpds;
if (JDBC.vmSupportsJNDI()) {
cpds = (ClientConnectionPoolDataSourceInterface)Class.forName(
"org.apache.derby.jdbc.ClientConnectionPoolDataSource").
newInstance();
} else {
cpds = (ClientConnectionPoolDataSourceInterface)Class.forName(
"org.apache.derby.jdbc.BasicClientConnectionPoolDataSource40").
newInstance();
}
cpds.setPortNumber(TestConfiguration.getCurrent().getPort());
// ConnectionPoolDataSource - EMPTY
dsCPConnectionRequests(new String[]
{"08001","08001","08001","08001",
"08001","08001","08001","08001","08001"},
cpds);
// ConnectionPoolDataSource
// - connectionAttributes=databaseName=<valid dbname>
cpds.setConnectionAttributes("databaseName=" + dbName);
dsCPConnectionRequests(new String[]
{"08001","08001","08001","08001",
"08001","08001","08001","08001","08001"},
cpds);
cpds.setConnectionAttributes(null);
// Test that database name specified in connection attributes is
// not used
// ConnectionPoolDataSource - databaseName=wombat and
// connectionAttributes=databaseName=kangaroo
cpds.setConnectionAttributes("databaseName=kangaroo");
cpds.setDatabaseName(dbName);
dsCPConnectionRequests(new String[]
{"OK","08001","OK","OK","08001","08001","OK","OK","OK"},
cpds);
cpds.setConnectionAttributes(null);
cpds.setDatabaseName(null);
// now with XADataSource
ClientXADataSourceInterface xads;
if (JDBC.vmSupportsJNDI()) {