Details

    • Type: Task
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.2.0.GA_CP02
    • Fix Version/s: 4.2.0.GA_CP03
    • Component/s: System
    • Labels:
      None
    • Affects:
      Release Notes

      Description

      The JBossMQ UIL2 WriteTask shutdowns when it is signaled by the ReadTask using an Thread.interrupt().

      If however, something "eats" that interrupt status of the thread then the WriteTask will block forever and never stop.
      This leads to thread leaks.

      The solution is not to wait forever for an interrupt. Instead the thread should periodically wake up
      and check the "started" flag. e.g. Here is the suggest patch in outline

      while (true)
      {
      + synchronized (running)
      +

      { + if (WriteState != Started) + break; + }

      BaseMsg msg = null;
      try
      {

      • msg = (BaseMsg) sendQueue.take();
        + // Only wait for 10 seconds
        + msg = (BaseMsg) sendQueue.poll(10000l);
        + if (msg == null)
        + continue; // re-start the loop when no message after 10 seconds

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dlofthouse Darran Lofthouse
                  Reporter:
                  dlofthouse Darran Lofthouse
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: