Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: IN PLACE UPDATE of an object type?
Am Thu, 03 Feb 2005 12:45:50 +0100 schrieb Michael Schaefers
<schaefe3_at_cs.uni-bonn.spam-remove.de>:
> Consider the following example TYPE:
>
> CREATE TYPE foo AS OBJECT (
> state INT,
> b BLOB,
>
> MEMBER FUNCTION difficultFunc RETURN INT,
> MEMBER FUNCTION easyFunc RETURN INT
> );
>
>
> !!!BUT: Both foo instances work on the same BLOB and therefore the
> instance stored in the database has become inconsistent: the "state"
> attribute says "unstructured", but
> the BLOB data is "structured"!!!
>
I think you have to implement a mutex protocol to access the BLOB.
The evtl. updating function difficultFunc has to place a lock
while working. Locking may be done by dbms_lock() or physical on
the tables row.
Both functions easyFunc and difficultFunc have to wait until the
lock is released.
-- Frank Piron, defrankatkonaddot (leftrotate two)Received on Thu Feb 03 2005 - 08:25:58 CST