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 ?
|