-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Can't commit transaction?
PostPosted: Sun Dec 19, 2010 9:17 am 
Newbie

Joined: Sun Dec 19, 2010 9:09 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.