I did this way, just expand the synchronized to contain the isSTFlow setting,
and tested it, it seems ok, but I do not know this way is ok or not. Could
you somebody help me? thanks.
        synchronized (cont) {
            if (!cont.isPending()) {
                isSTFlow = true;
            } else {
                isSTFlow = false;
            
                if (locks.remove(exchange.getExchangeId()) == null) {
                    throw new Exception("HTTP request has timed out");
                }
                if (log.isDebugEnabled()) {
                    log.debug("Resuming continuation for exchange: " +
exchange.getExchangeId());
                }
                exchanges.put(exchange.getExchangeId(), exchange);
                cont.resume();
                if (!cont.isResumed()) {
                    if (log.isDebugEnabled()) {
                        log.debug("Could not resume continuation for
exchange: " + exchange.getExchangeId());
                    }
                    exchanges.remove(exchange.getExchangeId());
                    throw new Exception("HTTP request has timed out for
exchange: " + exchange.getExchangeId());
                }
            }
        } 

--
View this message in context: 
http://servicemix.396122.n5.nabble.com/servicemix-http-BC-multiple-thread-problem-tp5096519p5104147.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to