Hi Mark,
Thomas here.
I just wanted to confirm that optimistic locking is also supported in OJB/ODMG.
In the early days (before 2002) the ODMG transaction manager did only provide pessimistic locking. But even then we did not use any pessimistic locking on the RDBMS, but used our own locking engine.
Since about two years it is now possible to use the Optimistic Locking as implemented by the OJB PersistenceBroker in OJB ODMG applications too.
In the class-descriptors of your persistent classes you have to set the isolation-level attribute to "optimistic". You can also do this globally on the descriptor-repository level.
cheers, Thomas
Mark Neighbors wrote:
----- Original Message ----- From: "Mark Neighbors" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Sunday, October 10, 2004 1:29 PM
Subject: Re: We need to migrate from ODMG to clustering with opt locking. Is this possible?
----- Original Message ----- From: "Charles Anthony" <[EMAIL PROTECTED]>
To: "'OJB Users List'" <[EMAIL PROTECTED]>
Sent: Thursday, October 07, 2004 2:00 AM
Subject: RE: We need to migrate from ODMG to clustering with opt locking. Is this possible?
-----Original Message----- From: Mark Neighbors [mailto:[EMAIL PROTECTED] Sent: 06 October 2004 20:54 To: [EMAIL PROTECTED] Subject: We need to migrate from ODMG to clustering with opt locking. Is this possible?
We need to know if OJB will support clustering with a low-cost migration
from where we are now: ODMG with pessimistic locking.
http://db.apache.org/ojb/docu/howtos/howto-work-with-clustering.html
In OJB will ODMG ever support optimistic locking?
It already does.
http://db.apache.org/ojb/docu/faq.html#optimisticLocking
But Thomas Mahler states the exact opposite in an earlier post at http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgId=493524.
"OJB's implementation of ODMG does not support optimistic locking, instead implements its own object based locking using a pessimistic strategy and ignores the underlying RDBMS. "
This post was on 3 Oct 2002, so possibly the odmg layer has been modified since then to support optimistic locking?
I misread the indentation level in the response tree. The folowing excerpt corrects the mistake.
Boring, Jeff W, ALBAS wrote:
> OK, so if I understand this correctly:
> > 1) OJB's implementation of ODMG does not support optimistic locking,
> instead implements its own object based locking using a pessimistic
> strategy and ignores the underlying RDBMS.
As our ODMG implementation is based on the PersistenceBroker API. Of course you can define a PB based optimistic locking and use it inside an ODMG application.
The last paragraph is Thomas Mahler's response.
But I still have doubt since the documentation recomments to use pessimistic locking.
Can you please resolve this for me?
Is there a viable caching solution?
See clustering reference above. Also see http://db.apache.org/ojb/docu/guides/objectcache.html
Several things here bring doubt to my mind.
The documentation states
"You need to secure the data at the database. Thomas Mahler recommended in one email that you use the Optimistic Locking feature that is provided by OJB when using the PB API in a clustered environment."
and
"When using one of the top-level API in most cases Pessimistic (Object) Locking is supported. In that case it is recommended to use a distributed lock management "
But we need to cluster in a standard api with optimistic locking. These statements don't give me a warm and fuzzy.
And the following excerpt from an earlier post at http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgId=1601279 also gives me doubt.
Matthias Gottschlich wrote:
> Hello,
> > since our O/R-Mapping seems to work with the stuff from OJB (i only read > the documentation so far....), i have a question concerning perforamce.
> I found many different cache-implementations for ojb.
> We need a cache that is:
> 1. one cache per server ( so that multiple threads see the objects, > cached by another thread)
> 2. transaction-safe ( if thread a in Transaxtion TXa create a new > object, thread b in Transaction TXb shouldn't see the ne object before > TXa is committed)
> 3. nice to have is clustering support.
> > It seems that 1 an 3 is delivered by OScache. But is OSCache > transactions-safe? Which cache supports 1 and 2 ???
Sorry currently none.
This is on the roadmap for 1.1. We want to implement a real two level cache. First level will be transaction-safe and deal with given objects, the second level only handle copies of given objects.
regards,
Armin
Can you please be more specific (and convincing) that there is a caching solution for clustering with optimistic locking in a standard api?
What about JDO?
Mark
___________________________________________________________
HPD Software Ltd. - Helping Business Finance Business
Email terms and conditions: www.hpdsoftware.com/disclaimer
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
