According to my understanding in hibernate (please confirm)
1- You have to session.close() if you get it by getSessionFactory().openSession()
if there is DB manipulation operation then it should be in transaction
if you call session.save(object)
hibernate create bellow query only .
select hibernate_sequence.nextval from dual
so right code is here
Transaction t=session.beginTransaction();
session.save(obect);
t.commit(); should not forgot to commit.
session.close();