policy.setId(new PolicyId(ptd.getPolicynumber(),ptd.getRenewingnumber()); session = HibernateUtil.getSessionFactory().openSession(); tx = session.beginTransaction(); System.out.println("111111"); System.out.println("222222"); session.save(ptd); System.out.println("333333"); tx.commit(); System.out.println("444444"); session.flush(); session.close();
The problem is it prints 111111,222222,333333 but it doesn't print 444444. I am having problems while i am trying to commit the transaction.
And if i don't use beginTransaction() and commit() then it doesn't save the value.
I am using hibernate 2 and websphere application server 7.5
|