This question relates to another question I asked, but what are the reasons why you use openSession () over getCurrentSession ()? I know that you would use openSession () so that you can independently control the closing and cleaning of the session, but why do you need to do this manually?
I used openSession () when I wanted to execute a transaction in isolation to the current session, although I'm not sure if this is the correct use of openSession ().
Why do you want to open multiple sessions?
java hibernate jpa
digiarnie
source share