With an Oracle SEQUENCE, there is no locking and thus no chance for a
deadlock. The whole reason SEQUENCEs exist is to avoid the primary key
locking problems you are trying to solve. You said there was some problem
when using sequences.... can you explain more?

-eric





                        May Charles N          To:    [EMAIL PROTECTED]
                        <[EMAIL PROTECTED]      cc:
                        M>                     Subject:    Re: Sequence ID Generator 
problems --
                        Sent by: A                    optimistic locking by App S      
        erve r?
                        mailing list for
                        Enterprise
                        JavaBeans
                        development
                        <EJB-INTEREST@JAV
                        A.SUN.COM>


                        07/25/2002 07:51
                        AM
                        Please respond to
                        May Charles N





That caused the database to deadlock.


-----Original Message-----
From: Evan Ireland [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 5:11 PM
To: May Charles N
Cc: [EMAIL PROTECTED]
Subject: Re: Sequence ID Generator problems -- optimistic locking by App
Serve r?





What about using "select for update" on the SeqIdGenerator EJB?
This should help to avoid the rollbacks.


*****************************************************************
DISCLAIMER:   The information contained in this e-mail may be confidential
and is intended solely for the use of the named addressee.  Access, copying
or re-use of the e-mail or any information contained therein by any other
person is not authorized.  If you are not the intended recipient please
notify us immediately by returning the e-mail to the originator.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to