ICEfaces
  1. ICEfaces
  2. ICE-1255

Tomcat 6 asynchronous features (preliminary)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.6DR#6, 1.6
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Operating System: Mac OS X 10.0
      Platform: Macintosh

      Description

      ICEfaces does not support the "CometEvent" features in Tomcat 6. Possibly this instead should be filed as
      a bug against the enterprise edition.

        Activity

        Hide
        Ted Goddard added a comment -

        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>

        Show
        Ted Goddard added a comment - 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>
        Hide
        Ted Goddard added a comment -

        The Tomcat 6 NIO capabilities do not seem to work with JDK 1.5 on MacOS X 10.4.9.

        Show
        Ted Goddard added a comment - The Tomcat 6 NIO capabilities do not seem to work with JDK 1.5 on MacOS X 10.4.9.
        Hide
        Ted Goddard added a comment -

        This is currently implemented by exposing ICEfaces queues through getters to the TomcatPushServlet; however it should be possible to pass the Tomcat asynchronous event to an EnvironmentAdaptingServlet by setting the Tomcat event as an attribute of the Request.

        Show
        Ted Goddard added a comment - This is currently implemented by exposing ICEfaces queues through getters to the TomcatPushServlet; however it should be possible to pass the Tomcat asynchronous event to an EnvironmentAdaptingServlet by setting the Tomcat event as an attribute of the Request.
        Hide
        Ted Goddard added a comment -

        The following Java option may be required on the Mac to force the use of IPV4; apparently IPV6 on the Mac JVM does not support the socket options desired.

        -Djava.net.preferIPv4Stack=true

        Show
        Ted Goddard added a comment - The following Java option may be required on the Mac to force the use of IPV4; apparently IPV6 on the Mac JVM does not support the socket options desired. -Djava.net.preferIPv4Stack=true
        Hide
        Ted Goddard added a comment -

        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)

        Show
        Ted Goddard added a comment - 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)
        Hide
        Ted Goddard added a comment -

        This was working, but appears broken in the latest build – the JavaScript bridge is now sending POST rather than GET (ICE-1707).

        Show
        Ted Goddard added a comment - This was working, but appears broken in the latest build – the JavaScript bridge is now sending POST rather than GET ( ICE-1707 ).
        Hide
        Ted Goddard added a comment -

        Initial support for Tomcat 6 Asynchronous features (including JBoss 4.2) is now available. Error conditions do occur routinely, but developers may still wish to experiment with this for thread scalability.

        The recent checkin addressed a change in the JavaScript bridge: POST is now being used rather than GET for the blocking requests.

        Show
        Ted Goddard added a comment - Initial support for Tomcat 6 Asynchronous features (including JBoss 4.2) is now available. Error conditions do occur routinely, but developers may still wish to experiment with this for thread scalability. The recent checkin addressed a change in the JavaScript bridge: POST is now being used rather than GET for the blocking requests.
        Hide
        Ted Goddard added a comment -

        Since preliminary capability is now in place, specific issues will be created for specific bugs.

        Show
        Ted Goddard added a comment - Since preliminary capability is now in place, specific issues will be created for specific bugs.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: