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

        Ted Goddard created issue -
        Icefaces Administrator made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 1328 12524
        Ken Fyten made changes -
        Priority Major [ 3 ] Minor [ 4 ]
        Ken Fyten made changes -
        Assignee Ted Goddard [ ted.goddard ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #13908 Fri May 18 11:37:20 MDT 2007 ted.goddard initial Tomcat 6 asynchronous capability (ICE-1255)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/MainSessionBoundServlet.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/TomcatPushServlet.java
        Commit graph ADD /icefaces/trunk/icefaces/lib/catalina-comet.jar
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #13910 Fri May 18 12:21:54 MDT 2007 ted.goddard excluding class for JDK 1.4 compatibility (ICE-1255)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/build.xml
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #13912 Fri May 18 13:51:17 MDT 2007 ted.goddard conditionally compiling TomcatPushServlet on JDK 1.5 and potentially 1.6 (ICE-1255)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/build.xml
        Ted Goddard made changes -
        Fix Version/s 1.6DR#5 [ 10071 ]
        Affects Version/s 1.5.3 [ 10030 ]
        Affects Version/s 1.5.2 [ 10029 ]
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #13973 Thu May 24 11:39:52 MDT 2007 ted.goddard throw exception when Tomcat 6 asynch features are called through service() (ICE-1255)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/TomcatPushServlet.java
        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 ).
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #14257 Fri Jun 22 10:29:39 MDT 2007 ted.goddard prototype Tomcat 6 asynchronous capability fixed to read POST body from bridge (ICE-1255)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/TomcatPushServlet.java
        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.
        Ted Goddard made changes -
        Summary Tomcat 6 asynchronous features Tomcat 6 asynchronous features (preliminary)
        Fix Version/s 1.6 [ 10031 ]
        Fix Version/s 1.6DR#5 [ 10071 ]
        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.
        Ted Goddard made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Issue Type Bug [ 1 ] New Feature [ 2 ]
        Ken Fyten made changes -
        Fix Version/s 1.6DR#6 [ 10090 ]
        Fix Version/s 1.6 [ 10031 ]
        Ken Fyten made changes -
        Fix Version/s 1.6 [ 10031 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #16012 Thu Mar 13 11:17:28 MDT 2008 ted.goddard improved the logging message for tomcat asynch configuration (ICE-1255)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/TomcatPushServlet.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: