Hi,
I hope you are getting the problem because of whenever you are calling getCurrentSession() you are not getting already existing session, you are getting a new session.
One way of solving this problem is to do as follows:
// open session
session = sessionFactory.openSession();
//start transaction
txn = session.beginTransaction(0;
//do your work
//session.save(user);
//close transaction
txn.commit();
//close session
session.close();
Thanks,
K. Siva Prasad Reddy.