cm.cleanupOnError(StandardException.closeException(), false);
}
} catch (Throwable t) {
StandardException se;
// ensure that the severity will shutdown the service
if ((t instanceof StandardException) && (((StandardException) t).getSeverity() == ExceptionSeverity.DATABASE_SEVERITY))
se = (StandardException) t;
else
se = Monitor.exceptionStartingModule(t);
if (cm != previousCM) {
//Assume database is not active. DERBY-4856 thread dump
cm.cleanupOnError(se, false);
}
if (ts != null) {
ts.shutdown();
synchronized (this) {
services.remove(ts);
}
// Service root will only have been created if
// ts is non-null.
boolean deleteOnError = (properties !=null ?
properties.getProperty(Property.DELETE_ROOT_ON_ERROR) !=null:false);
if (create || deleteOnError)
provider.removeServiceRoot(serviceName);
}
Throwable nested = se.getCause();
// never hide ThreadDeath
if (nested instanceof ThreadDeath)
throw (ThreadDeath) nested;