-->
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: How can i getCurrentSession in multi-thread from hibernate4
PostPosted: Thu Nov 28, 2013 3:27 am 
Newbie

Joined: Thu Nov 28, 2013 3:15 am
Posts: 1
My project structure is struts2 2.3.X Spring3 hibernate4 . I have a method is to update an Object, and then generate Excel in the background Thread , but it couldn't get the Session in the background Thread (this is what I expected), because the Session is bound to the request of the Thread, and my dao class all get Current Session, I don't want to change my dao class ,how can I use getCurrentSession() to acquire the Session from the background Thread ? OR how to solve the problem of obtaining current Session under multi-thread ?


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.