bindings/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java [287:324]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void process(MessageExchange exchange) throws Exception {
        final String id = exchange.getExchangeId();

        // Synchronize on the mutex object while we're tinkering with the continuation object,
        // this is still jetty, so do not trust jetty locks anymore
        final Continuation continuation = continuations.get(id);
        if (continuation != null){
            final Object mutex = continuation.getAttribute(MUTEX);
            if (mutex == null) {
                handleLateResponse(exchange);
                return;
            }
            synchronized (mutex) {
                if (!continuation.isExpired() && !continuation.isResumed()) {
                    logger.debug("Resuming continuation for exchange: {}", id);

                    // in case of the JMS/JCA flow, you might have a different instance of the message exchange here
                    continuation.setAttribute(EXCHANGE, exchange);

                    continuation.resume();


                    // if the continuation could no longer be resumed, the HTTP request might have timed out before the message
                    // exchange got handled by the ESB
                    if (!continuation.isResumed()) {
                        handleLateResponse(exchange);
                    }
                } else {
                    // it the continuation is no longer available or no longer pending, the HTTP request has time out before
                    // the message exchange got handled by the ESB
                    handleLateResponse(exchange);
                }
            }
        } else {
            handleLateResponse(exchange);
        }

    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



bindings/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java [93:129]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void process(MessageExchange exchange) throws Exception {
        final String id = exchange.getExchangeId();

        // Synchronize on the mutex object while we're tinkering with the continuation object,
        // this is still jetty, so do not trust jetty locks anymore
        final Continuation continuation = continuations.get(id);
        if (continuation != null){
            final Object mutex = continuation.getAttribute(MUTEX);
            if (mutex == null) {
                handleLateResponse(exchange);
                return;
            }
            synchronized (mutex) {
                if (!continuation.isExpired() && !continuation.isResumed()) {
                    logger.debug("Resuming continuation for exchange: {}", id);

                    // in case of the JMS/JCA flow, you might have a different instance of the message exchange here
                    continuation.setAttribute(EXCHANGE, exchange);

                    continuation.resume();


                    // if the continuation could no longer be resumed, the HTTP request might have timed out before the message
                    // exchange got handled by the ESB
                    if (!continuation.isResumed()) {
                        handleLateResponse(exchange);
                    }
                } else {
                    // it the continuation is no longer available or no longer pending, the HTTP request has time out before
                    // the message exchange got handled by the ESB
                    handleLateResponse(exchange);
                }
            }
        } else {
            handleLateResponse(exchange);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



