-->
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: Error in ThreadLocal Pattern
PostPosted: Wed Feb 02, 2005 7:05 am 
Newbie

Joined: Fri Oct 01, 2004 8:41 am
Posts: 8
Location: Vienna
Hello!

On page 302 (Book: Hibernate in Action) the method

Code:
public static void commitTransaction()


sets the Transaction reference of the Thread to null before the commit()
statement. This makes the rollback() call useless, cause the tx.rollback() statemant will never be executed cause tx is null.


I guess, that the first line
Code:
threadTransaction.set(null);
is a typo?

Best Regards


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.