cpds.setUser(null);
cpds.setPassword(null);
cpds = null;
// now with XADataSource
EmbeddedXADataSource xads = new EmbeddedXADataSource();
// XADataSource - EMPTY
dsConnectionRequests(new String[] {
"08006","08006","08006","08006",
"08006","08006","08006","08006","08006"},
(XADataSource) xads);
// XADataSource - databaseName=wombat
xads.setDatabaseName(dbName);
dsConnectionRequests(new String[] {
"08004","08004","08004","OK",
"08004","08004","08004","08004","08004"},
(XADataSource) xads);
xads.setDatabaseName(null);
// XADataSource - connectionAttributes=databaseName=wombat");
xads.setConnectionAttributes("databaseName=" + dbName);
dsConnectionRequests(new String[] {
"08006","08006","08006","08006",
"08006","08006","08006","08006","08006"},
(XADataSource) xads);
xads.setConnectionAttributes(null);
// XADataSource - attributesAsPassword=true
xads.setAttributesAsPassword(true);
dsConnectionRequests(new String[] {
"08006","08006","08006","08006",
"08006","08006","08006","08006","08006"},
(XADataSource) xads);
xads.setAttributesAsPassword(false);
// XADataSource - databaseName=wombat, attributesAsPassword=true
xads.setDatabaseName(dbName);
xads.setAttributesAsPassword(true);
dsConnectionRequests(new String[] {
"08004","08004","08004","XJ028",
"XJ028","08004","08004","OK","08004"},
(XADataSource) xads);
xads.setAttributesAsPassword(false);
xads.setDatabaseName(null);
setDatabaseProperty("derby.connection.requireAuthentication", "false");
TestConfiguration.getCurrent().shutdownDatabase();
}