-->
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.  [ 3 posts ] 
Author Message
 Post subject: Difference between beginTransaction() and begin()
PostPosted: Fri Oct 31, 2008 3:05 am 
Newbie

Joined: Thu Oct 30, 2008 9:27 am
Posts: 10
Location: indore
HI ,
Can any body tell the difference between
sessionFactory.getCurrentSession()
.beginTransaction(); and
sessionFactory.getCurrentSession().getTransaction().begin();
thanks in advance

_________________
Naresh Bahety
Software Engineer
Impetus Infotech Pvt Ltd Indore
Cell:9893073973


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 31, 2008 9:07 am 
Newbie

Joined: Fri Oct 31, 2008 6:27 am
Posts: 4
beginTransaction() creates a new transaction if none exists or uses the current one if it exists. This method also returns the transaction object.

begin() always creates a new transaction and does not return the transaction object.

hope it will help


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 23, 2009 3:31 am 
Newbie

Joined: Thu Oct 30, 2008 9:27 am
Posts: 10
Location: indore
thanks a lot...

_________________
Naresh Bahety
Software Engineer
Impetus Infotech Pvt Ltd Indore
Cell:9893073973


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.