-->
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: Strange behaviour when using Criteria API
PostPosted: Wed May 06, 2009 9:15 am 
Newbie

Joined: Wed Jul 23, 2008 10:48 am
Posts: 5
Hi folk,

we have a very strange problem in our hibernate application.
When performing a Criteria hibernate somehow writes data into the database. Debugging through the code we couldn't find any commits to the database driver. Anyways the data could not be rolledback afterwards.
All operations are running in one single hibernate transaction and the corresponding commit/rollback of this transaction is called as expected.

Changing the FlushMode to COMMIT in the Criteria changes this behaviour, but results in the problem that hibernate couldn't find unsaved entities in an other Criteria call.

Any suggestions what to do?

We are using hibernate 3.3.1.GA together with an Oracle 10g database.

Regards
Marco


Top
 Profile  
 
 Post subject: Re: Strange behaviour when using Criteria API
PostPosted: Wed May 06, 2009 11:41 am 
Newbie

Joined: Wed Jul 23, 2008 10:48 am
Posts: 5
Hi folk,

we solved the problem. The autocommit from the jdbc driver was active, so the hibernate flush results sometimes in a commit from the jdbc driver. Disabling the autocommit solved the problem.

This were very long and hard hours finding this problem.

Regards,
Marco


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.