private SQLException _internal_stopSlave(String slaveServerHost,
int slaveServerPort,
String dbPath) throws Exception {
util.DEBUG("_internal_stopSlave");
ClientDataSourceInterface ds;
if (JDBC.vmSupportsJNDI()) {
ds = (ClientDataSourceInterface)Class.forName(
"org.apache.derby.jdbc.ClientDataSource").newInstance();
} else {
ds = (ClientDataSourceInterface)Class.forName(
"org.apache.derby.jdbc.BasicClientDataSource40").newInstance();
}
ds.setDatabaseName(dbPath);
ds.setServerName(slaveServerHost);
ds.setPortNumber(slaveServerPort);
ds.setConnectionAttributes("internal_stopslave=true"
+useEncryption(false));
try {
Connection conn = ds.getConnection(); //
conn.close();
return null; // If successfull -
} catch (SQLException se) {
util.DEBUG(se.getErrorCode()+" "+se.getSQLState()+" "+se.getMessage());
return se;