-->
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.  [ 2 posts ] 
Author Message
 Post subject: How to do multiple transaction per session?
PostPosted: Thu Jul 05, 2007 11:51 pm 
Newbie

Joined: Thu Jul 05, 2007 9:24 pm
Posts: 6
In accordance with my previous question on How to post multiple saveorupdate from a single form? I would liek to know how to do multiple transaction in a single session?
Thanks

_________________
Gopu


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 06, 2007 1:31 am 
Regular
Regular

Joined: Mon Mar 26, 2007 12:38 am
Posts: 119
Hi,
Code:
Session session = HibernateUtil.currentSession() ;
session.getTransaction().begin();
// ------ Some Work
session.getTransaction().commit() ;

session.getTransaction().begin();
// ------ Some Work
session.getTransaction().commit() ;

HibernateUtil.closeSession() ;


Rate the reply if you find it helpful


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

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.