You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Adam Henderson Azudio <az...@hotmail.com> on 2005/06/10 12:52:40 UTC

Double Click & Hibernate

Hi all,

I'm not sure if I'm doing something stupid or its a genuine problem  
but I'm using Springs OSIV filter with Hibernate 3, I have a page  
that lists my users and I have a DirectLinks to a detail page for  
each of the listed users which invokes a selectUser listener, this  
listener takes the id service parameter and retrieves the user. I can  
cause my app to crash by double clicking on the link, throwing a  
Hibernate exception "Illegal attempt to associate a collection with  
two open sessions". Single clicking and waiting works as expected.

I think I understand why this is happening, the session from the  
first request has not cleaned up before the second is created*.  
What's the accepted way around this, I'm using loads of pages like this.

Many thanks,

Adam.


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Double Click & Hibernate

Posted by Adam Henderson Azudio <az...@hotmail.com>.
Thanks Marcus,

Your suggestion sounds like a good one, I'll look into it. In the  
meantime, I had another rethink and I don't think I need to keep the  
object in the session so I'm only storing the entity id and restoring  
the object as needed, this also reduced the size of my visit object a  
little.


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org