Skip to content

Commit

Permalink
rhbz1074365 Remove redundant shutdown hook
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Mar 10, 2014
1 parent 8dfc2d8 commit 3089cb6
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ ValidationService getValidationService() {
@Observer(ZanataInit.EVENT_Zanata_Startup)
public void start() {
log.info("starting...");

Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
TranslationWorkspaceManagerImpl.this.stop();
}
});
}

@Observer(ZanataIdentity.USER_LOGOUT_EVENT)
Expand Down Expand Up @@ -218,10 +211,7 @@ private boolean projectIterationIsActive(EntityStatus projectStatus,
public void stop() {
log.info("stopping...");
log.info("closing down {} workspaces: ", workspaceMap.size());
stopListeners();
}

private void stopListeners() {
// Stopping the listeners frees up the EventServiceImpl servlet, which
// would otherwise prevent Apache Coyote from shutting down quickly.
// Note that the servlet may still hang around up to the max timeout
Expand Down

0 comments on commit 3089cb6

Please sign in to comment.