-->
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: Not getting StaleObjectException in batch mode
PostPosted: Sat Jul 07, 2007 11:27 am 
Newbie

Joined: Sat Jul 07, 2007 11:15 am
Posts: 1
Hibernate version:3.1.3
Database version:Oracle 9i

I'm using version-based optimistic lock. During concurrent modifications, I get a StaleObjectException when the following property is set to false:

hibernate.jdbc.batch_versioned_data

However when it's set to true, I do not see any StaleObjectException. I examined the source code, and it seems the problem is in AbstractEntityPersister class. The following statement explains the problem:

if ( useBatch ) {
session.getBatcher().addToBatch( 1 );
return true;
}
else {
return check( update.executeUpdate(), id, j );
}

Here - the check method is doing the version check. It doesn't get called if useBatch property is true, which in turn is true when hibernate.jdbc.batch_versioned_data property is set to true. I need this property to optimize execution with batch mode - so setting it to false is not an option. What other options can I look at?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 07, 2008 11:28 pm 
Newbie

Joined: Sun Sep 07, 2008 11:07 pm
Posts: 17
Hi,
I am having the same problem. Did you find any solution


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.