Re: Locking Modes

Franck Routier <[email protected]>
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <1217922334.6636.19.camel@franck-laptop>
Hi Anthony,

regarding Oracle, a good news is that one of our new client is demanding
Oracle instead of Postgres. So I will have to test on both Oracle and
Postgres...

Franck

Le mardi 05 août 2008 à 15:21 +1000, Anthony Berglas a écrit :
> As I work through the Whitepaper I see that the locking modes have 
> become confused.
> 
> Locking and Isolation is very complex in general. And to understand 
> the real meaning of the different query options on the different 
> databases is a major undertaking. The documentation is generally 
> awful. I do know that using Oracle without FOR UPDATE in the default 
> isolation mode will cause corruptions.
> 
> I propose a simple approach.
> 
> 1. Optimistic locking always performed. Even if other modes 
> available. Ie. do our own locking because we don't trust the database.
> 
> 2. Session.setIsolationLevel added. Just calls through to 
> JDBC. SimpleORM does not change whatever default is used by the
> database.
> 
> 3. SOPTIMISTIC_UNCHECKED added back, so that certain fields that 
> cause grief can be excluded (eg. LONG type in Oracle).
> 
> 4. FOR UPDATE off by default.
> 
> Update Off by default is normally very dangerous. But having 
> optimistic locks backing it up should make it OK. People can then 
> add the FOR UPDATE mode when optimistic locks get broken too often.
> 
> I'm pretty sure that Hibernate gets this completely wrong. I'm 
> downloading Oracle and will do some tests.
> 
> Regards,
> 
> Anthony
> 
> Dr Anthony Berglas, [email protected] Mobile: +61 4 4838 8874
> Just because it is possible to push twigs along the ground with ones
> nose
> does not necessarily mean that is the best way to collect firewood.
> 
> 
> 
> 
>  



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/SimpleORM/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/SimpleORM/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.