activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stirling Chow (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-3012) HttpTunnelServlet incorrectly swallows exceptions during transport creation.
Date Tue, 02 Nov 2010 20:55:00 GMT
HttpTunnelServlet incorrectly swallows exceptions during transport creation.
----------------------------------------------------------------------------

                 Key: AMQ-3012
                 URL: https://issues.apache.org/activemq/browse/AMQ-3012
             Project: ActiveMQ
          Issue Type: Bug
          Components: Transport
    Affects Versions: 5.4.1
            Reporter: Stirling Chow
            Priority: Minor
         Attachments: patch.txt

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.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message