I am new to hibernate.
Does session.getTransaction().commit()
, close the session? Because in the api documentation it is not mentioned that it closes the session.
In my code I have
session.getTransaction().commit();
session.close();
But I get following exception
org.hibernate.SessionException: Session was already closed
If I remove session.close()
, then I do not get this exception.