Hi Thomas,
I already override isLive method and I return always true.

I can't understand if is possibile to create an Exception and send it to 
the client from the class PersistenceFilter. 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.

Thanks for your patience

Il giorno domenica 26 agosto 2012 12:55:56 UTC+2, Thomas Broyer ha scritto:
>
>
>
> On Thursday, August 16, 2012 12:57:02 AM UTC+2, bond wrote:
>>
>> 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.
>>
>
> If you cannot retrieve the same object twice in the same session (but 
> different transactions), then fix that.
> As an alternative, you can also override the isLive method of your 
> Locators so that it doesn't rely on find().
>
> But I reiterate my first answer: you're looking at the wrong problem.
>

-- 
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/-/W0tngk8ye3MJ.
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