Re: Table / row lock strategy

From: Lennart Jonsson <>
Date: 12 May 2003 08:08:10 -0700
Message-ID: <> (Robert) wrote in message news:<>...
> 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:

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

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

Original text of this message