if (JDBC.vmSupportsJNDI()) {
ds = (ClientDataSourceInterface)Class.forName(
"org.apache.derby.jdbc.ClientDataSource").newInstance();
} else {
ds = new BasicClientDataSource40();
}
ds.setDatabaseName(dbPath);
ds.setServerName(hostName);
ds.setPortNumber(portNo);