The CommonHeadersFilter in JBoss-4.2.0.GA seems to conflict with the Http11NioProcessor, causing the following exception to be thrown when the push connection is used, for instance curl -I http://localhost:8080/timezone7/block/receive-updated-views/
java.lang.ClassCastException: org.jboss.web.tomcat.filters.ReplyHeaderFilter
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:896)
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:701)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2031)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
java.lang.Thread.run(Thread.java:613)
To turn off the filter, change the mapping in
server/default/deploy/jboss-web.deployer/conf/web.xml
from
<filter-mapping>
<filter-name>CommonHeadersFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
to
<filter-mapping>
<filter-name>CommonHeadersFilter</filter-name>
<url-pattern>/</url-pattern>
</filter-mapping>
(this will essentially disable the filter; since it only adds branding to the HTTP headers, this is likely acceptable)
Tomcat 6 must be specially configured to use the NIO connector:
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000"
redirectPort="8443" />
Until the Tomcat Push capabilities are integrated with the dispatching mechanism, the TomcatPushServlet must be specifically configured:
<servlet>
<servlet-name>Tomcat Push Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.http.servlet.TomcatPushServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Tomcat Push Servlet</servlet-name>
<url-pattern>/block/receive-updated-views/*</url-pattern>
</servlet-mapping>