Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3514

MessageListenerServlet does not clear the timer on destroy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 5.5.0
    • 5.6.0
    • None
    • None
    • Patch Available

    Description

      Hi,

      we are debugging a shutdown problem using the activemq-web-console deployed into jetty.

      It seems as if everything is terminated as expected, apart from a TimerThread which logs to the console about every minute.

      05 Jul 2011 09:03:19,246 DEBUG [Timer-1] org.apache.activemq.web.MessageListenerServlet.debug() – Cleaning up expired web clients.

      Tracing down the problem indicated one possible cause.
      The web-console package declares the AjaxServlet to send messages via the web to the broker, it extends MessageListenerServlet.

      The init() mehtod of the MessageListenerServlet schedules task

      clientCleanupTimer.schedule( new ClientCleaner(), 5000, 60000 );

      but the timer (clientCleanupTimer) is never canceled and according to the javadoc of Timer this can prevent the JVM from shutting down cleanly.

      Patch attached

      Attachments

        Activity

          People

            Unassigned Unassigned
            johkir Johannes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: