context.setThreadBindingListener(new ThreadSetupBindingListener(actions));
try {
try {
context.create();
} catch (Exception e) {
throw new StartException(MESSAGES.createContextFailed(), e);
}
try {
context.start();
} catch (LifecycleException e) {
throw new StartException(MESSAGES.startContextFailed(), e);
}
if (context.getState() != 1) {
throw new StartException(MESSAGES.startContextFailed());
}
WebLogger.WEB_LOGGER.registerWebapp(context.getName());
} finally {
JsfInjectionProvider.getInjectionContainer().set(null);
}