Uploaded image for project: 'Synapse'
  1. Synapse
  2. SYNAPSE-288

AbstractPollingTransportListener fails to cancel timer on destroy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • NIGHTLY
    • 1.2
    • Transports
    • None

    Description

      After AbstractPollingTransportListener#destroy is called, the following exception is triggered:

      Exception in thread "PollTimer" java.util.concurrent.RejectedExecutionException
      at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1477)
      at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:384)
      at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:856)
      at org.apache.synapse.transport.base.threads.NativeWorkerPool.execute(NativeWorkerPool.java:55)
      at org.apache.synapse.transport.base.AbstractPollingTransportListener$1.run(AbstractPollingTransportListener.java:81)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)

      Obviously the timer still tries to schedule a new task after the worker pool has been shut down. I suspect that the reason is that AbstractTransportListener#stop doesn't call stopListeningForService, given that AbstractPollingTransportListener cancels the timers there.

      Attachments

        Issue Links

          Activity

            People

              asankha Asankha Chamath Perera
              veithen Andreas Veithen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: