0

I'm working on a Tomcat 7 web application that includes an asynchronous call using a DeferredResponse object.

All was fine until we introduced Terracotta into the mix for session sharing in our cluster. I'm now getting this in our Catalina logs:

java.lang.IllegalStateException: Async support must be enabled on a servlet and
for all filters involved in async request processing. This is done in Java code
using the Servlet API or by adding "<async-supported>true</async-supported>" to
servlet and filter declarations in web.xml.

We've used the tag throughout out configuration and this has done the job, right until the TerracottaTomcat70xSessionValve valve was introduced to the Tomcat context.xml configuration:

<?xml version="1.0" encoding="UTF-8"?>
<Context>
    <Valve className="org.terracotta.session.TerracottaTomcat70xSessionValve" tcConfigUrl="[config-url]" />
</Context>

What I'm looking for is how to configure the Terracotta Session Valve to support asynchronous requests?

4

2 回答 2

1

我有一个类似的问题。尝试在标签 Valve 中添加参数 asyncSupported="true"。就我而言,它奏效了。

<Context>
<Valve className="org.terracotta.session.TerracottaTomcat70xSessionValve" asyncSupported="true" tcConfigUrl="[config-url]" />

于 2013-10-03T09:37:50.063 回答
0

如果使用tomcat-redis-session-manager-1.2-tomcat-7-1.2.jar 请修改conf支持异步。

例子:

<Valve className="com.radiadesign.catalina.session.RedisSessionHandlerValve" asyncSupported="true" />
<Manager className="com.radiadesign.catalina.session.RedisSessionManager"
         host="localhost" 
         port="6379" 
         database="0" 
         maxInactiveInterval="60" />
于 2015-05-28T09:10:07.097 回答