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();
txn = session.beginTransaction(0;
//do your work
K. Siva Prasad Reddy.