[ 
https://issues.apache.org/activemq/browse/SM-1407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mateusz Nowakowski reopened SM-1407:
------------------------------------

    Regression:   (was: [Broken Unit Test])

org.apache.servicemix.http.endpoints.HttpConsumerEndpoint sets an error on 
message in case of timeouts, it generates such exception:

java.lang.IllegalStateException: component is not owner when trying to set 
error: java.lang.Exception: Exchange timed out: ID:10.136.44.179-11cd73d18dc-4:4
at 
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setError(MessageExchangeImpl.java:264)
at 
org.apache.servicemix.common.endpoints.SimpleEndpoint.fail(SimpleEndpoint.java:82)
at 
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.process(HttpConsumerEndpoint.java:319)
at 
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:757)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:371)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at 
org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectChannelConnector.java:525)
at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
Caused by: java.lang.Exception: Exchange timed out: 
ID:10.136.44.179-11cd73d18dc-4:4
at 
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.process(HttpConsumerEndpoint.java:318)
... 15 more

This code generates this isuue:
if (!cont.isResumed()) { 
 Exception e = new Exception("Exchange timed out: " + exchange.getExchangeId());
 fail(exchange, e);
 throw e; 
}
The consumer sets error on actually sent exchange. It is not the owner of this 
exchange, because it sends it before to the bus, and wait for the answer.

The previous version of this piece of code was that:
if (!result) {
 throw new Exception("Timeout"); 
}
I don't know either if other catches and fail invokes made sense, because it 
would generate the same error.

And last question. Let's say that setting an error would be succeed, the 
message would be sent again to the bus with the error. What would happen? The 
consumer creates the exchange and sets error to this exchange, there is nobody 
who can "eat" this error.

> Memory Leak in http consumer processor when a timeout occurs
> ------------------------------------------------------------
>
>                 Key: SM-1407
>                 URL: https://issues.apache.org/activemq/browse/SM-1407
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-http
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: 3.2.2, servicemix-http-2008.01, 3.2.3, 3.3
>
>         Attachments: ConsumerProcessor.java
>
>


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

Reply via email to