If go for non-spring solution, yes, you should override the
processCall().
Just take a look at the source, you should invoke the
RPC.encodeResponseForFailure(method, ex)
to encode the Exception and send back to client.

I didnt test. It may not compile, you may try anyway ... :)

public String processCall(String payload) throws
SerializationException {
    try {
      RPCRequest rpcRequest = RPC.decodeRequest(payload,
this.getClass(), this);

      if (isValidSession())   // may add other conditions when should
check, when should not check..
      {
          return RPC.invokeAndEncodeResponse(this,
rpcRequest.getMethod(),
              rpcRequest.getParameters(),
rpcRequest.getSerializationPolicy());
      }
      else
      {
         return RPC.encodeResponseForFailure(rpcRequest.getMethod(),
new NotLoggedInException());
      }

    } catch (IncompatibleRemoteServiceException ex) {
      getServletContext().log(
          "An IncompatibleRemoteServiceException was thrown while
processing this call.",
          ex);
      return RPC.encodeResponseForFailure(null, ex);
    }
  }

private boolean isValidSession(....)
{
    //...
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to