use of org.jvnet.hudson.reactor.ReactorException in project hudson-2.x by hudson.
the class Hudson method doReload.
/**
* Reloads the configuration.
*/
@CLIMethod(name = "reload-configuration")
public synchronized HttpResponse doReload() throws IOException {
checkPermission(ADMINISTER);
// engage "loading ..." UI and then run the actual task in a separate thread
WebAppController.get().install(new HudsonIsLoading());
new Thread("Hudson config reload thread") {
@Override
public void run() {
try {
SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM);
reload();
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Failed to reload Hudson config", e);
} catch (ReactorException e) {
LOGGER.log(Level.SEVERE, "Failed to reload Hudson config", e);
} catch (InterruptedException e) {
LOGGER.log(Level.SEVERE, "Failed to reload Hudson config", e);
}
}
}.start();
return HttpResponses.redirectViaContextPath("/");
}
Aggregations