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: Concurrency question

Re: Concurrency question

From: Eric Parker <eric.parker.spamless_at_virgin.net>
Date: Sun, 8 Jun 2003 18:52:26 +0100
Message-ID: <wJKEa.4064$0d7.120254@newsfep4-glfd.server.ntli.net>

"John Bossert" <jbossert_at_usa.net> wrote in message news:3EE37324.7090604_at_usa.net...
> I have a table of unique numbers, call them PINs. Once a PIN has been
assigned
> to a user, it needs to be unavailable to other users.
>
> I have a query which identifies unallocated PINs. However, I don't know
the
> best way to avoid the situation where two transactions could grab the same
PIN,
> if a second transaction began before the first transaction committed.
>
> Is there a convention/best practice for handling this scenario? I'm aware
of
> SERIALIZABLE, but am concerned about the potential impact on throughput.
>
> Oracle 8.1.7.3.0 and 9.2.0.3.0 on Solaris 8. Client application is Tomcat
4.1
> and java servlets.
>
> Pointers appreciated.
>
> --
> John Bossert
>
> In what concerns you much, do not think that you
> have companions: know that you are alone in the world.
>
> -- Henry David Thoreau
>

One way would be to select the row for update. Then update it to 'allocated' and commit.

HTH eric Received on Sun Jun 08 2003 - 12:52:26 CDT

Original text of this message

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