Opened 10 years ago

Closed 10 years ago

#1893 closed defect (fixed)

Starting and stopping BASE in Tomcat is not implemented correctly

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 3.4
Component: web Version:
Keywords: Cc:

Description

When starting up BASE there are two servlets that are configured to be started immediately.

  • StartStopServlet
  • ExtensionsServlet

While this is ok at startup time, I noticed that when stopping Tomcat the servlets are destroyed in the same order as they were started up. This means that when the extensions system is about to shut down, the BASE main app has already been closed so any extensions that need to perform actions (eg. services) will not be able to do anything.

I also found the following http://stackoverflow.com/questions/6874512/order-of-calling-destroy-method-on-servlets-filters discussion and it seems like there is no guarantee that a servlet is kept alive at all times. Luckily we have not noticed any strange re-starts of BASE...

The solution to use a servlet context listener is also mentioned and I found the following code example: http://www.mkyong.com/servlet/what-is-listener-servletcontextlistener-example/

Change History (1)

comment:1 by Nicklas Nordborg, 10 years ago

Resolution: fixed
Status: newclosed

(In [6629]) Fixes #1893: Starting and stopping BASE in Tomcat is not implemented correctly

Also nullify several static propertis in Application class.

Note: See TracTickets for help on using tickets.