-->
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: Note on Oracle style batch updates
PostPosted: Wed Sep 03, 2008 9:43 pm 
Beginner
Beginner

Joined: Thu Jul 06, 2006 11:09 pm
Posts: 25
Hibernate version: 3.2.6ga

Full stack trace of any exception that occurs: a StaleObjectStateException is thrown when Oracle style batch updates is enabled (I still don't know why).

Name and version of the database you are using: Oracle 11g

The generated SQL (show_sql=true): Update statement

Actually, this exception appeared when I enabled the Oracle style batch updates without reading the "Note" part.

Quote:
Oracle JDBC supports two distinct models for update batching:

* The standard model, implementing the JDBC 2.0 specification, which is referred to as standard update batching

* The Oracle-specific model, independent of the JDBC 2.0 specification, which is referred to as Oracle update batching

Note:
It is important to be aware that you cannot mix these models. In any single application, you can use one model or the other, but not both. Oracle JDBC driver will throw exceptions when you mix these.


This was in the note when Turning Performance on Oracle JDBC OCI Drivers. Hibernate uses the pure JDBC style batch updates:

Code:
Statement.addBatch()


But Oracle JDBC OCI driver is different. My only reason why I enabled the Oracle style batch updates is the performance since my application will not be deployed with the Oracle server.

I hope the Hibernate developers can investigate on this matter.

_________________
Don't forget to rate.


Top
 Profile  
 
 Post subject: Note on Oracle style batch updates - Duplicate
PostPosted: Thu Sep 04, 2008 5:34 am 
Beginner
Beginner

Joined: Thu Jul 06, 2006 11:09 pm
Posts: 25
Duplicate post. Moderator, please delete this one.

Thanks!

_________________
Don't forget to rate.


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.