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 10 + Sun App Server 7: Unique Constraint Violation?!?

Re: Oracle 10 + Sun App Server 7: Unique Constraint Violation?!?

From: Steve Howard <stevedhoward_at_gmail.com>
Date: 15 Nov 2006 09:13:56 -0800
Message-ID: <1163610836.151552.189490@e3g2000cwe.googlegroups.com>

joeNOSPAM_at_BEA.com wrote:
>
> Hi. It sounds like a thread safety issue. If multiple client threads
> all ask the DBMS what the nextval is, and get the same value,
> and then all try to send back a new row with that value, you'll
> get your problem. You could run an experiment where you
> add a string column, and inert the appserver's java thread ID
> and a timestamp. Whenever your app gets the unique key
> violation, query the row for what thread beat you to it, and
> when.
>
> Joe Weinstein at BEA Systems

Hi Joe,

If he is truly using Oracle sequences, then this won't occur, as they are incremented serially.

Regards,

Steve Received on Wed Nov 15 2006 - 11:13:56 CST

Original text of this message

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