GWT needs to wrap any exception to make it serializable and prevent
the server from answering a 500 http status code. that is, GWT moves
exception handling from HTTP layer to each own and the exception is
handled on the client, which first tries to parse the exception and
rethrows it, thats how RPC handles it.

however, you can give your implementation of RemoteServiceServlet and
handle, maybe some special exceptions, your way, and even return them
to the client if you want without having RPC stack to handle them


On 21 Feb., 12:37, klemensr <klem...@reinthaler.info> wrote:
> With concurrency I mean something like 
> this:http://en.wikipedia.org/wiki/Optimistic_concurrency_control
>
> I am not setting the error code by myself. The thing is that GWT is
> shomewhere translating the original exception created through
> hibernate (concurrency detected) to the excetion postet above. In this
> step the error code is set automatically.
>
> Because of the fact that the ServletException is an unchecked
> exception GWT has to make a translation to a standard exception (in
> this case InvocationException/StatusCodeException).
>
> So I think I should modify this translation machanism - but does
> anybody know how to do this? Is there any better way of doing that?
>
> I really appreciate your help!
>
> On 17 Feb., 18:15, Thomas Broyer <t.bro...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I'm not sure what you mean by "concurrency" here, but how about returning a
> > 409 (Conflict) status code instead of 500?
>
> >http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10
>
> > 500 means "internal server error", i.e. something the client cannot do
> > anything about.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to