ICEfaces
  1. ICEfaces
  2. ICE-1010

Jetty servlet-container integration

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.5.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Operating System: Mac OS X 10.0
      Platform: Macintosh

      Description

      Jetty provides support for Continuations, potentially making it a good match for asynchronous HTTP
      operations. ICEfaces does not currently make use of Jetty Continuations.

        Activity

        Hide
        Ted Goddard added a comment -

        Checked in an initial version working with Jetty Continuations. It was necessary to modify the
        ResponseState.block() API so that the request would be available to the continuation when the blocking
        occurs.

        svn commit . -m "Initial Jetty Continuation implementation along with more explicit exception handling
        in BlockingServlet (ICE-1010)"
        Sending src/com/icesoft/faces/webapp/xmlhttp/BlockingResponseState.java
        Sending src/com/icesoft/faces/webapp/xmlhttp/BlockingServlet.java
        Adding src/com/icesoft/faces/webapp/xmlhttp/ContinuationResponseState.java
        Sending src/com/icesoft/faces/webapp/xmlhttp/PortletBlockingResponseState.java
        Sending src/com/icesoft/faces/webapp/xmlhttp/ResponseState.java
        Sending src/com/icesoft/faces/webapp/xmlhttp/ResponseStateManager.java
        Adding src/com/icesoft/faces/webapp/xmlhttp/SessionExpiredException.java
        Committed revision 12196.

        Configure Jetty to allow idle HTTP connections: in etc/jetty.xml set maxIdleTime to 600000.

        <Call name="addConnector">
        <Arg>
        <New class="org.mortbay.jetty.nio.SelectChannelConnector">
        <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
        <Set name="maxIdleTime">600000</Set>
        <Set name="Acceptors">2</Set>
        <Set name="confidentialPort">8443</Set>
        </New>
        </Arg>
        </Call>

        jetty-util-6.0.1.jar was added as a compile-time dependency. This appears to be apache-licensed,
        but that needs to be confirmed. For ICEfaces we may just want to include the Jetty interfaces
        rather than the entire jar (100k).

        Since the exception handling in BlockingServlet is updated, we need to carefully add in the desired
        handling. The previous "catch(Exception e)" was too broad, but we will temporarily encounter errors
        until we refine the handling to the exact exceptions needed.

        Show
        Ted Goddard added a comment - Checked in an initial version working with Jetty Continuations. It was necessary to modify the ResponseState.block() API so that the request would be available to the continuation when the blocking occurs. svn commit . -m "Initial Jetty Continuation implementation along with more explicit exception handling in BlockingServlet ( ICE-1010 )" Sending src/com/icesoft/faces/webapp/xmlhttp/BlockingResponseState.java Sending src/com/icesoft/faces/webapp/xmlhttp/BlockingServlet.java Adding src/com/icesoft/faces/webapp/xmlhttp/ContinuationResponseState.java Sending src/com/icesoft/faces/webapp/xmlhttp/PortletBlockingResponseState.java Sending src/com/icesoft/faces/webapp/xmlhttp/ResponseState.java Sending src/com/icesoft/faces/webapp/xmlhttp/ResponseStateManager.java Adding src/com/icesoft/faces/webapp/xmlhttp/SessionExpiredException.java Committed revision 12196. Configure Jetty to allow idle HTTP connections: in etc/jetty.xml set maxIdleTime to 600000. <Call name="addConnector"> <Arg> <New class="org.mortbay.jetty.nio.SelectChannelConnector"> <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set> <Set name="maxIdleTime">600000</Set> <Set name="Acceptors">2</Set> <Set name="confidentialPort">8443</Set> </New> </Arg> </Call> jetty-util-6.0.1.jar was added as a compile-time dependency. This appears to be apache-licensed, but that needs to be confirmed. For ICEfaces we may just want to include the Jetty interfaces rather than the entire jar (100k). Since the exception handling in BlockingServlet is updated, we need to carefully add in the desired handling. The previous "catch(Exception e)" was too broad, but we will temporarily encounter errors until we refine the handling to the exact exceptions needed.
        Hide
        Ted Goddard added a comment -

        The major work for this bug was improvement to exception handling (as requested in bugs 1064 and
        1177 – the changes may or may not resolve the problems they were seeing) so it may make sense to port
        the changes for this bug to 1.5.2 and include Jetty support.

        Show
        Ted Goddard added a comment - The major work for this bug was improvement to exception handling (as requested in bugs 1064 and 1177 – the changes may or may not resolve the problems they were seeing) so it may make sense to port the changes for this bug to 1.5.2 and include Jetty support.
        Hide
        Ted Goddard added a comment -

        Backport seems reasonable and would benefit the Jetty/ICEfaces community so re-targeting for 1.5.2.

        The changes for this bug affect exception handling in the BlockingServlet. Previously, this servlet
        contained a catch(RuntimeException e) which was overly broad and sometimes masked application (or
        ICEfaces) exceptions. Such exceptions will now be thrown by the Servlet; hence, developers may see
        exceptions that they did not see previously (which is a benefit, because it allows latent bugs to be fixed).

        Show
        Ted Goddard added a comment - Backport seems reasonable and would benefit the Jetty/ICEfaces community so re-targeting for 1.5.2. The changes for this bug affect exception handling in the BlockingServlet. Previously, this servlet contained a catch(RuntimeException e) which was overly broad and sometimes masked application (or ICEfaces) exceptions. Such exceptions will now be thrown by the Servlet; hence, developers may see exceptions that they did not see previously (which is a benefit, because it allows latent bugs to be fixed).
        Hide
        Ted Goddard added a comment -

        The following change has been checked into the 1.5 branch. There is now a compile-time dependency
        on jetty-util-6.0.1.jar. The change has been tested with tomcat 5.5.20 and jetty 6.0.1.

        svn commit lib core -m "Jetty Continuation implementation along with more explicit exception handling
        in BlockingServlet (ICE-1010)"
        Sending core/src/com/icesoft/faces/webapp/xmlhttp/BlockingResponseState.java
        Sending core/src/com/icesoft/faces/webapp/xmlhttp/BlockingServlet.java
        Adding core/src/com/icesoft/faces/webapp/xmlhttp/ContinuationResponseState.java
        Sending core/src/com/icesoft/faces/webapp/xmlhttp/PortletBlockingResponseState.java
        Sending core/src/com/icesoft/faces/webapp/xmlhttp/ResponseState.java
        Sending core/src/com/icesoft/faces/webapp/xmlhttp/ResponseStateManager.java
        Adding core/src/com/icesoft/faces/webapp/xmlhttp/SessionExpiredException.java
        Adding (bin) lib/jetty-util-6.0.1.jar
        Transmitting file data .......
        Committed revision 12769.

        Show
        Ted Goddard added a comment - The following change has been checked into the 1.5 branch. There is now a compile-time dependency on jetty-util-6.0.1.jar. The change has been tested with tomcat 5.5.20 and jetty 6.0.1. svn commit lib core -m "Jetty Continuation implementation along with more explicit exception handling in BlockingServlet ( ICE-1010 )" Sending core/src/com/icesoft/faces/webapp/xmlhttp/BlockingResponseState.java Sending core/src/com/icesoft/faces/webapp/xmlhttp/BlockingServlet.java Adding core/src/com/icesoft/faces/webapp/xmlhttp/ContinuationResponseState.java Sending core/src/com/icesoft/faces/webapp/xmlhttp/PortletBlockingResponseState.java Sending core/src/com/icesoft/faces/webapp/xmlhttp/ResponseState.java Sending core/src/com/icesoft/faces/webapp/xmlhttp/ResponseStateManager.java Adding core/src/com/icesoft/faces/webapp/xmlhttp/SessionExpiredException.java Adding (bin) lib/jetty-util-6.0.1.jar Transmitting file data ....... Committed revision 12769.
        Hide
        Ted Goddard added a comment -

        Removed nested exception constructors for compatibility with JDK 1.4. Checked into head and 1.5
        branch.

        svn commit core/src/com/icesoft/faces/webapp/xmlhttp/SessionExpiredException.java -m "modified for
        compatibility with JDK 1.4 (ICE-1010)"
        Sending core/src/com/icesoft/faces/webapp/xmlhttp/SessionExpiredException.java
        Transmitting file data .
        Committed revision 12789.

        Show
        Ted Goddard added a comment - Removed nested exception constructors for compatibility with JDK 1.4. Checked into head and 1.5 branch. svn commit core/src/com/icesoft/faces/webapp/xmlhttp/SessionExpiredException.java -m "modified for compatibility with JDK 1.4 ( ICE-1010 )" Sending core/src/com/icesoft/faces/webapp/xmlhttp/SessionExpiredException.java Transmitting file data . Committed revision 12789.
        Hide
        Ted Goddard added a comment -

        Verified that Jetty continuations are used when ICEfaces application is installed in jetty-6.0.1.

        Show
        Ted Goddard added a comment - Verified that Jetty continuations are used when ICEfaces application is installed in jetty-6.0.1.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: