-->
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.  [ 1 post ] 
Author Message
 Post subject: SessionManager and Transaction in multi-threaded environment
PostPosted: Mon Sep 04, 2006 8:04 pm 
Newbie

Joined: Fri May 05, 2006 3:52 pm
Posts: 2
I'm trying to get an understanding of how the transaction context would work in a multi-threaded environment. I want to understand how to use it as well as how it's internally implemented (high level) if possible.

So say I have two parallel threads and/or I want the transactional boundaries to span two separate requests (different threads).

I don't know if SessionFactory stores the session context as a ThreadLocal variable, but my understanding is that the same session will be returned within the same thread, being that the transactions has not been started and committed.

So basically the question is whether it's the Transaction context and/or Session, I'd like to get access to same session context across threads, basically to ensure it has the same jdbc connection object, as well as demarcate the transaction across threads. Is this something that hibernate provides and/or what would be the best way of implementing it.

Thanks.

Ilya Sterin


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

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.