--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
You're supposed to use a single session per request but one transaction per service method.
Hi Thomas,
thanks for your reply. My problem is not use or not use a Filter to solve this problem. My problem is try to send exception caugth in PersicensteFilter on the client. I need a per request session and transaction.
If my problem was only lazy inizialization of course this method is not necessary. I've many entity with complex fields and when I persist, RF calls automatically findById that raise org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session. So I need that when I call a method on RF all go in a unique session and transaction.
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.