-->
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: concurrent access to persistent objects?
PostPosted: Sat Jul 02, 2005 8:56 am 
Newbie

Joined: Fri Jul 01, 2005 6:38 pm
Posts: 1
Hi,

I have a simple question, because I am not sure I understood the docs correctly: I know a session is single threaded, that means there should be only one thread at a time accessing the Session object, right? But how about persistent objects: in the following scenario:

1) thread 1 opens a Session and gets some persistent objects A, B and C from the database
2) the Session stays open
3) thread1 ,2 ,3 all work on each of the objects A, B, C and modify them, but no thread accesses the Session object
4) thread1 closes the Session again

Is this allowed, can all three threads 1,2,3 work on the persistent objects A, B, C concurrently as long as they don't touch the session object?

Best Regards,
Ingo


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 03, 2005 2:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Not safe. Possible proxy accesses (which can hit the session).


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.