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

Home -> Community -> Usenet -> c.d.o.server -> Re: oracle row level locking with JSP?

Re: oracle row level locking with JSP?

From: Ted Knijff <knijff_at_bigfoot.com>
Date: Sun, 18 Mar 2001 07:25:31 GMT
Message-ID: <3ab46065.76875881@news.online.de>

Maybe from a developer point of view, doing a : select .. for update ...
to give the user some data and hope he doesn't timeout the session before his change is committed, is the easy way out. To do it properly, the better way is to do a normal select (without locking the row or table), save the critical variable data in a session table and do the "select for update", "update" and "commit" in one go, after checking the critical data against the original data for updates by other sessions. This is a lot more work. So to make life easy, perhaps just forbid it or say "it doesn't work" ?? ;-)

On Sat, 17 Mar 2001 20:57:49 +0100, "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:

>
>"Nicolas Bronke" <newsgroup_at_trinity.de> wrote in message
>news:98vs8r$4rt$01$1_at_news.t-online.com...
>> > > Is it True, that the oracle row level locking is with Java JSP
 impossible?
>> > >
>> > Why do you assume that is true?
>> > It isn't, BTW
>> >
>> Because our java developers said that. In our "standard" client server
>> application, we are using
>>
>> select * from tablename where <whereclause> for update nowait
>>
>> so that one record is locked and another user gets immediatly an error
>> message if he starts updating the same record. Thats works really fine and
>> handy.
>>
>> Now we are transferring some parts to an intranet application using oracle
>> as the database backend and Apache as the application server, so that we
>> have an thin client. Now these developers told me, that this way is not
>> possible (select ... for update nowait) if we are developing JSPs. I could
>> not believe that. This is the reason why I am looking for another meaning.
>>
>> Regards
>>
>> Nicolas
>>
>>
>
>In my experience such general assertions by developers have always be proven
>to be wrong, and instead of that showed their lack of knowledge of jdbc and
>other tools.
>In one of the applications I am aware of no bind variables have been used.
>This is not because it is not possible, it is just because they have been
>too lazy to write the extra code.
>In the JSP applications I have been monitoring I have *never* seen any sign
>of table level locking.
>So I would ask *written proof* from your developers (JSP manuals etc) and
>without any doubt you could proof it is not true.
>If they too never use bind variables in their code, you already know enough:
>they are being lazy.
>
>Regards,
>
>Sybrand Bakker, Oracle DBA
>
>
>

EMail: knijff_at_bigfoot.com Received on Sun Mar 18 2001 - 01:25:31 CST

Original text of this message

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