-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Multiple Concurrent Sessions
PostPosted: Mon Jan 02, 2006 5:34 pm 
Newbie

Joined: Fri Feb 04, 2005 9:49 pm
Posts: 4
Hi,

I am looking for a way to work on the same object within two sessions. One session is the reader session for lazy=true objects. In that session write attempts are never made (if I get it right from the reference manual, a session is unusable after an exception has occurred, so I do not want write attempts to corrupt my reader session which in turn would affect lazy fetching). The other session is the writer session which is opened on demand. When an exception occurs, it is closed and forgotten.

However, when I try to persist an object loaded from the first session thru the second session I get an "Illegal attempt to associate a collection with two open sessions".

I could simply disable lazy fetching and close the first session after loading. But the object structures I am loading are large. I consider disabling lazy fetching only as a last resort.

Is there a better solution for that problem?

Hibernate version: 3.1

Name and version of the database you are using: PostgreSQL 8


Top
 Profile  
 
 Post subject: Multiple Concurrent Sessions
PostPosted: Mon Jan 02, 2006 5:36 pm 
Newbie

Joined: Fri Feb 04, 2005 9:49 pm
Posts: 4
I forgot to mention that the save attempts can happen at any time. There is no guarantee that after the save attempt the object is no longer used.
What I am trying to realize is (among much more) an editor with a save button, which persists the current object state on invocation without closing the editor...


Thanks for any help
--Bruon


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.