-->
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: Database rollback, but hibernate does not know about it
PostPosted: Fri Jan 09, 2009 11:55 am 
Newbie

Joined: Fri Jun 29, 2007 6:59 am
Posts: 4
Hi

We are currently using Hibernate 3.3.1 + Oracle 10G + Spring 2.5 for dependency injection, transactions etc

We have run into a number of occasions recently where hibernate thinks there has been a commit (ie the code has run its course with no exceptions which should have resulted in a commit) however this has not resulted in actual rows committed to the database.

Turning up the logging level shows hibernate issuing insert and update statements to the database.

Is it possible under normal cirumstances that hibernate may not know that a rollback has taken place?

Are there settings to make hibernate look more closely at whether a transaction has passed or not?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 09, 2009 12:17 pm 
Senior
Senior

Joined: Thu Jan 08, 2009 3:48 pm
Posts: 168
Are your classes annotated with @Transactional?

I just had the opposite effect, loaded collection in one class, passed it to another but some context information got lost.
Log showed commit of transaction when the collection was passed from one class to another.
After adding @Transactional the commit went away


Top
 Profile  
 
 Post subject: Transaction rollback
PostPosted: Mon Jan 12, 2009 12:08 pm 
Newbie

Joined: Fri Jun 29, 2007 6:59 am
Posts: 4
Hi

Thanks for reply...

Sometimes we use the transaction annotation and sometimes we use manual transactions.

In both cases we get rollbacks that cannot be explained and which do not cause any form of exception in the Java code.


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.