Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The OpenRemoteServiceServlet is no longer needed.  The RemoteServiceServlet has been updated and the limitations mentioned above are no more.  You can either patch a copy of AsyncRemoteServiceServlet in your project, until a new jetty-gwt.jar release, or override the readContent(HttpServletRequest request) and doUnexpectedFailure(Throwable caught) in your subclass.  Here is the overide override for that the replaced readPayloadAsUtf8 as /renamed readPayloadAsUtf8 (GWT 1.6.x), which is mentioned above.

Code Block
java
java
protected String readContent(HttpServletRequest request)
      throws IOException, ServletException
{
    String payload=(String)request.getAttribute( PAYLOAD );
    if ( payload==null )
    {
        payload=super.readContent( request );
        request.setAttribute( PAYLOAD,payload );
    }
    return payload;
}

...

Code Block
java
java
private static final String JETTY_RETRY_REQUEST_EXCEPTION = "org.mortbay.jetty.RetryRequest";

/**
 * Overridden to really throw Jetty RetryRequest Exception (as opposed to sending failure to client).
 *
 * @param caught the exception
 */
protected void doUnexpectedFailure(Throwable caught)
{
    throwIfRetryRequest(caught);
    super.doUnexpectedFailure(caught);
}

/**
 * Throws the Jetty RetryRequest if found.
 *
 * @param caught the exception
 */
protected void throwIfRetryRequest(Throwable caught)
{
    if (caught instanceof UnexpectedException)
    {
        caught = caught.getCause();
    }

    if (JETTY_RETRY_REQUEST_EXCEPTION.equals(caught.getClass().getName()))
    {
        throw (RuntimeException)caught;
    }
}
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery