Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Table / row lock strategy

Re: Table / row lock strategy

From: Lennart Jonsson <lennart_at_kommunicera.umea.se>
Date: 12 May 2003 08:08:10 -0700
Message-ID: <6dae7e65.0305120708.56b175d9@posting.google.com>


grobert_at_azet.sk (Robert) wrote in message news:<a8497ec7.0305120136.5f3c7227_at_posting.google.com>...
> Hi!
>
> Is there any general, table/row and database independent lock
> strategy? I`m writing a web aplication in which one logical
> transaction goes through several JSP`s. To not to hold connection from
> database connection pool I pick up connection from pool on the first
> JSP retrieve data and then release connection back to the pool, so the
> session from the view of the database is over. Then throu several
> JSP`s data are processed using HTTP session object and just on the
> last JSP data need to be writen in database. Through all the time, all
> coresponding rows need to be locked. From the db engine view they are
> not because db session is over on the first screen.
>
> Constraints to solution:
> 1. Releasing connection on first screen after retrieving data, thus
> closing database session.
> 2. not to put any extra column in the table with flag indicating that
> the coresponding row is locked.
> 3. not to lock whole table.
>
> Thanks.
> Robert

Here is one article that goes the other way around. I.e. not locking rows, instead checking that no one else changed the row, since you read it:

http://www7b.software.ibm.com/dmdd/library/techarticle/0209kuznetsov/0209kuznetsov.html

it probably violates condition 2 above, but perhaps you can make something out of it anyhow.

/Lennart Received on Mon May 12 2003 - 10:08:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US