-->
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: autocommit=true and call to beginTransaction()
PostPosted: Thu May 28, 2009 10:09 am 
Newbie

Joined: Fri May 22, 2009 11:52 am
Posts: 3
What happens if I have autocommit set to true, but then calling beginTransaction method at some point? I suppose that autocommit should be automatically disabled and reenabled after commit or rollback. Is this correct?


Top
 Profile  
 
 Post subject: Re: autocommit=true and call to beginTransaction()
PostPosted: Thu May 28, 2009 12:19 pm 
Newbie

Joined: Tue May 19, 2009 11:22 am
Posts: 6
Hibernate will depend on JDBC or JTA to execute the transactions.

If we are using JDBC, I mean, non managed environment, "beginTransaction()" automatically takes care of setting the auto commit to false.

In managed environment, with JTA, if we call "beginTransaction()" transaction will be created only if there is no active transaction in the current context.

Hibernate will take care of the auto commit.

Hope I answered your question.

-Kadle


Top
 Profile  
 
 Post subject: Re: autocommit=true and call to beginTransaction()
PostPosted: Thu May 28, 2009 1:23 pm 
Newbie

Joined: Fri May 22, 2009 11:52 am
Posts: 3
Answered, thank you


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.