Servlet.destroy method not called when stopping web bundle

Description

Starting a web bundle calls the init() method of the servlet, but stopping the bundle doesn't call the destroy() method, that appears to be called only when stopping the whole karaf container.
To replicate the problem:

  1. install the attached jar

  2. start the bundle :"init() called" is printed on the console

  3. stop the bundle :"destroy() called" should be printed, but it is not

  4. repeating steps 2 and 3 cause multiple call to only the init() method

  5. stop karaf: "destroy() called" is printed on the console

Environment

Apache karaf 4.0.4

Activity

Show:
Achim Nierbeck
March 19, 2016, 5:36 PM
Edited

Looks like the servletHandler does give back a stop signal while the servlet hasn't been stopped.

Achim Nierbeck
March 19, 2016, 7:53 PM

fixed on master
cherry pick still needed

Achim Nierbeck
March 19, 2016, 8:21 PM

Assignee

Achim Nierbeck

Reporter

Francesco Di Paolo

Labels

Components

Fix versions

Affects versions

Priority

Major
Configure