You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2010/10/28 12:10:03 UTC

[jira] Assigned: (SMX4-653) HTTP Binding component: processing client timeout on provider side could led to endless loop

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

Jean-Baptiste Onofré reassigned SMX4-653:
-----------------------------------------

    Assignee: Jean-Baptiste Onofré

> HTTP Binding component: processing client timeout on provider side could led to endless loop
> --------------------------------------------------------------------------------------------
>
>                 Key: SMX4-653
>                 URL: https://issues.apache.org/activemq/browse/SMX4-653
>             Project: ServiceMix 4
>          Issue Type: Improvement
>          Components: Bundles
>    Affects Versions: 4.4.0
>         Environment: Windows 7
>            Reporter: Andrei Shakirin
>            Assignee: Jean-Baptiste Onofré
>         Attachments: AsyncBaseLifeCycle.java.patch
>
>
> Hi ServiceMix team,
> I have found one potential issue in SMX http binding component in CXF integration scenario.
> Environment: CXF SE, ServiceMix 4.0.
> Test case: CXF service provider has a long running operation (takes more than client's HTTP timeout).
> 1) HTTP binding component receives request from the consumer, creates message exchange, adds it to locks table and sends it to channel (org.apache.servicemix.http.processors.ConsumerProcessor).
> 2) After HTTP incoming timeout, ConsumerProcessor is called once more with pending continuation (ContinuationSupport.getContinuation(request, null);). By pending continuation exchange is removed from the locks table.
> 3) When business method sends response,  HTTP binding component is called (ConsumerProcessor.process(MessageExchange exchange)) , checks locks table for exchange, exchange is not found there and it throws exception (throw new Exception("HTTP request has timed out"))
> 4) Exception is catched in AsyncBaseLifeCycle (processExchangeInTx), added into exchange and exchange will be sent to channel again.
> Effect in CXF integration: business method will be called in endless loop (there is no explicit check for fault in exchange).
> Proposal: probably it makes sense to change exchange status from ACTIVE to ERROR before send exchange again into channel.
> (method AsyncBaseLifeCycle.processExchangeInTx(), code:
>                 if (oldStatus == ExchangeStatus.ACTIVE) {
>                     exchange.setError(t instanceof Exception ? (Exception) t : new Exception(t));
>                     channel.send(exchange);
>                 }
>  )
> Regards,
> Andrei Shakirin.

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