Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.24.0
-
None
-
None
-
Reviewed
-
Improved excpetion handling of shutting down web server. (Devaraj K via Eric Yang)
Description
1. If listener stop method throws any exception then the webserver stop method will not be called
public void stop() throws Exception { listener.close(); webServer.stop(); }
2. also, WebAppContext stores all the context attributes, which does not get cleared if only webServer is stopped.
so following calls are necessary to ensure clean and complete stop.
webAppContext.clearAttributes(); webAppContext.stop();
3. Also the WebAppContext display name can be the name passed to HttpServer instance.
webAppContext.setDisplayName(name);
instead of
webAppContext.setDisplayName("WepAppsContext");