This is how I get a Hibernate session and make a request.
HSession.getSession().createQuery("query here").executeUpdate();
AND
Critaria cr=HSession.getSession().createCritaria(..).. ;
HSession is where my factory session is located and the getSession() method returns a new session
(getSessionFactory().openSession();)
I want to know,
source share