Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 10 + Sun App Server 7: Unique Constraint Violation?!?
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
![]() |
![]() |