On Sunday, August 26, 2012 2:20:20 PM UTC+2, bond wrote:
>
> Forgetting for a moment the question of how I manage sessions with 
> Hibernate, I would like to know how I can raise and send an exception to 
> the client from the PersistenceFilter class ie outside the context of the 
> request.


You have two choices:

   - Return anything but a 200 status code, to trigger a "request transport 
   error" on the server-side (handled by the RequestTransport on the 
   client-side; it's generally used for authentication, as in the Expenses and 
   Mobile Web App samples for instance)
   - Send back a "general failure" message. Use the 
MessageFactory<http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/web/bindery/requestfactory/shared/messages/MessageFactory.html>AutoBeanFactory
 to create the message and AutoBeanCodex to serialize it. 
   The message should consist of a ResponseMessage with a non-null 
   generalFailure ServerFailureMessage. The other properties can (should) be 
   null. The ServerFailureMessage properties map directly to the ServerMessage 
   properties passed to the onFailure of the various Receivers.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/knwM0eJEeesJ.
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