3 Replies Latest reply on Apr 20, 2010 11:57 AM by timfox

    handling JMS Bridge threads

    jmesnil

      I'm refactoring JMS Bridge threads for https://jira.jboss.org/jira/browse/HORNETQ-287.

       

      SVN is down so I can't commit but I can describe the fix. I'd not want to rollback a 2nd time.

       

      The JMS Bridge use 3 threads:

      - 1 to check batch expiry time

      - 1 to receive messages from the source destination

      - 1 to handle eventual failures

       

      The issue is that the failure handler thread is not always properly stopped when the bridge is stopped.

      In order to cleanly fix this, I'll also replace the 3 threads by a single executor with a 3-sized thread pool.

      The executor will be able to execute the 3 runnable tasks concurrently.

      When the bridge is stopped, we shutdownNow the executor and await its termination.

       

      sounds correct or am I missing something?