Hello,
Does calling commit() or rollback() automatically close the session that you are using? I've checked the doco and it does not mention it, but after issuing a commit (or rollback) I get the following exception:
To solve this problem, try using this mehod for opening the session
Session session = HibernateUtil.getSessionFactory().openSession();
instead of
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
If we use the getCurrentSession() method , tansaction.commit() / rollback() closes the connection.
If you are ver particular in using getCurrentSession. Then check whether session.isOpen() is true or false based on that
you can handle the issue