-->
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.  [ 1 post ] 
Author Message
 Post subject: An operation fails but transaction commit result ok
PostPosted: Thu Jun 05, 2008 3:26 pm 
Newbie

Joined: Thu Jun 05, 2008 3:15 pm
Posts: 1
Hi everybody!
I have a problem handling transactions and I have not any idea to solve it! :(
Can you help me?

I'm working with Hibernate 2.0 and Java Struts framework.

My code is like this:

1.- new session and begin transaction

2.- load object_1 (db table 1)
3.- update object_1 (db table_1)
4.- insert object_2 (db table_2)
5.- delete object_3 (db table_2)

6.- commit transaction

All the transaction is in a try and catch statement and in case of error I will rollback transaction.

Sometimes only the operation 5 is ok and the commit don't fails (the operation 3 and 4 don't throw any exception but the registers are not updated and inserted).

Any idea?
thanks everybody!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.