[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Transactions and locking




OK here goes the scenario.

We load the document / fragment the result of a query into an in-memory
version. At this point we may want to lock the document in the database on a
specific level (Read only if no updates are going to be made) or (Write lock
if we don't want another user to read as well). Also need to provide some
time out functionality so that if the user holds on to the lock for too
long. The user then writes the in memory document / fragment back to the
database.

Also thinking about this is there a converter for the Query part which
returns a NodeList to convert it to an in memory version or another DOM
(made up of fragments)

Thanks
Rajiv
-----Original Message-----
From: Falko Braeutigam [mailto:falko@softwarebuero.de]
Sent: Wednesday, May 10, 2000 12:12 PM
To: ozone-users@ozone-db.org
Subject: Re: Transactions and locking


On Wed, 10 May 2000, Rajiv Rawal wrote:
> Hi all,
> 
> I am trying to understand the Transaction and locking scheme in more
detail
> in ozone. I have seen the ExtenalTransaction interface. 
> When a transaction starts, i think it implicitely locks the nodes. Now
what
> happens when another user tries to access a locked node. Does the user get
> an exception???. Can he still have read only access.
ozone uses pessimistic locking - multiple reads but exclusice writes.
Transactions are blocked until the object is available or a deadlock was
detected.

The native ozone API does not provide a read only mode. 

Note: In contrast to RDBMS that can lock 'objects' when the transaction
starts, ozone locks objects when they are accessed. This may lead to OODBMS
like race and deadlock conditions but there is no chance to come around this
limitation.

> 
> Also is there a way to explicitly set locks??
Early ozone version provided a lock() method. The current version doesn't.
Why
do you need this feature.


Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de