-->
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: dangerous transaction - rollback ignored
PostPosted: Fri Feb 01, 2008 10:56 pm 
Senior
Senior

Joined: Tue Sep 13, 2005 2:01 am
Posts: 137
I use JBoss 4.0.5 GA. JSF web application

create a thread local userTransaction

userTransaction.begin() // in JSF before invoke application phase

em.persist(entity1) //create entity in session bean using entity manager
...
do something that throw exception
cought the exception and indicate the transaction need to rollback

userTransaction.rollback() // in JSF after invoke application phase

but entity1 is created in database.

I debugged the code, the rollback was called.

Thanks for help.
Dave


Top
 Profile  
 
 Post subject: Re: dangerous transaction - rollback ignored
PostPosted: Mon Feb 04, 2008 6:52 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
What is the hibernate configuration for this? I assume hibernate is in a local transaction scope or hibernate is configured in a non-CMT transaction environment.



Farzad-


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.