You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Stirling Chow (JIRA)" <ji...@apache.org> on 2010/11/02 21:55:00 UTC
[jira] Created: (AMQ-3012) HttpTunnelServlet incorrectly swallows
exceptions during transport creation.
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.
[jira] Updated: (AMQ-3012) HttpTunnelServlet incorrectly swallows
exceptions during transport creation.
Posted by "Stirling Chow (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stirling Chow updated AMQ-3012:
-------------------------------
Attachment: patch.txt
Patch for HttpTunnelServlet.java
> 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.