return su;
} catch (Throwable e) {
// There is a chance the thread context classloader has been changed by the xbean kernel,
// so put back a good one
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
kernel.destroy();
if (e instanceof DeploymentException) {
throw ((DeploymentException) e);
} else {
throw failure("deploy", "Could not deploy xbean service unit", e);
}