I am new to hibernate and I have a little confusion in retrieving sessions using getCurrentSession() and openSession(), many articles mentioned that getCurrentSession creates a brand new session if one is not already existing and does not create a new session if a session is already available, and on the other hand openSession creates a brand new session.
- Here I have a confusion does openSession() always creates a brand new session?
- Does hibernate pools sessions to uses the same session in the getCurrentSession()?
Can you please help me to clarify this and apologies for any mistake I made
thanks a lot