Really? I tried dispatch(this) and dispatching to a separate thread pool I created. In both cases exchange.isComplete() returned true in my Cassandra listener and writing response data resulted in an exception.
You need to call the HttpServerExchange#dispatch() method, this will stop the exchange from ending when the call stack returns.
Stuart
----- Original Message -----
> From: "Adrian" <agbauer@gmail.com>
> To: undertow-dev@lists.jboss.org
> Sent: Friday, 23 May, 2014 12:21:53 PM
> Subject: [undertow-dev] asynchronous cassandra queries
>
> Hi
>
> I'm trying to query Cassandra asynchronously from inside an HttpHandler, but
> by the time the listener is run, Undertow has closed the response channel.
> Is there some way to keep it open? Can you suggest another approach?
>
> Thanks
> Adrian
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev