camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Krasser (JIRA)" <>
Subject [jira] Created: (CAMEL-2986) IllegalStateException in CamelContinuationServlet under heavy load
Date Thu, 22 Jul 2010 19:20:51 GMT
IllegalStateException in CamelContinuationServlet under heavy load

                 Key: CAMEL-2986
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-jetty
    Affects Versions: 2.4.0
            Reporter: Martin Krasser
            Assignee: Martin Krasser
             Fix For: 2.5.0

Reason is a race between continuation.suspend() and continuation.resume(). It can occur that
continuation.resume() is executed before continuation.suspend() leading to an IllegalStateException
thrown by Jetty:

java.lang.IllegalStateException: DISPATCHED,initial
    at org.eclipse.jetty.server.AsyncContinuation.dispatch(
    at org.eclipse.jetty.server.AsyncContinuation.resume(
    at org.apache.camel.component.jetty.CamelContinuationServlet$1.done(
    at org.apache.camel.processor.UnitOfWorkProcessor$1.done(
    at org.apache.camel.processor.DefaultChannel$1.done(
    at org.apache.camel.processor.RedeliveryErrorHandler$1.done(

This is the case when an async completion callback is faster than the thread that is concurrently
executing the {{if (continuation.isInitial())}} block. 

I'll commit a fix soon that also follows the recommendations in
to always call continuation.suspend() before registering the continuation with a callback

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

View raw message