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

HttpTunnelServlet incorrectly swallows exceptions during transport creation.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.4.1
    • 5.6.0
    • Transport
    • None
    • Patch Available

    Description

      Symptom
      =======
      org.apache.activemq.transport.http.HttpTunnelServlet.java contains the following logic:

      protected BlockingQueueTransport createTransportChannel(HttpServletRequest request, HttpServletResponse response) throws IOException {
      ...
      clients.put(clientID, answer);
      Transport transport = answer;
      try

      { HashMap options = new HashMap(transportOptions); transport = transportFactory.serverConfigure(answer, null, options); }

      catch (Exception e)

      { IOExceptionSupport.create(e); }

      If the call to transportFactory.serverConfigure(...) throws an exception, IOExceptionSupport.create(e) is called, which wraps the exception in an IOException, but that IOException is never thrown.

      Solution
      =======
      See attached patch file. Add a "throw" clause to propagate the IOException.

      Attachments

        1. patch.txt
          0.7 kB
          Stirling Chow

        Activity

          People

            Unassigned Unassigned
            stirlingc Stirling Chow
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: