-->
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.  [ 4 posts ] 
Author Message
 Post subject: Unable to turn off autocommit with mysql is frustrating me!!
PostPosted: Thu Mar 18, 2004 10:18 pm 
Newbie

Joined: Mon Nov 17, 2003 3:50 pm
Posts: 19
I can't seem to turn off auto-commit with mysql!!!

I followed the instructions on how to do this with Hibernate, but it doesn't work consistently. Once in a while, I get the "can not commit - autocommit is turned on" exception!

Here is my setup:
MySQL 4.x, Jboss, hibernate 2.1.2 as a Jboss Mbean using JDCTransactionManager. I also set all my tables to InnoDB.

Is this a bug? Is hibernate switching autocommit back on before I can commit?

Anyone using a similar set-up as mine???


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 19, 2004 10:54 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Hibernate is always turning of autocommit itself, unless you use a user supplied connection. If you are running inside JBoss I would anyways recomend using a JBoss datasource as connection provieder.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 19, 2004 2:53 pm 
Newbie

Joined: Mon Nov 17, 2003 3:50 pm
Posts: 19
I am using a jboss datasource. Hibernate is set-up as an mbean and I'm getting the connections via jndi.

Again, the autocommit=true exception is inconsistent.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 24, 2004 2:40 pm 
Newbie

Joined: Mon Nov 17, 2003 3:50 pm
Posts: 19
I fixed the problem by adding the parameter relaxAutoCommit=true.


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