Session handling is changed to open session from getCurrentSession.

Session handling is changed to open session from getCurrentSession.