...
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 |
|---|
|
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 |
|---|
|
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;
}
}
|