yes, db specific sequence depends on db vendor.
read chapter "Primary key Generation Strategies" from "EJB Patterns" book.
in this chapter you can find 3 way to generate primary keys (random
sequence, calculating using database table (not depend on db vendore,
support clustering environment by transaction isolation) and using stored
procedures (depend on db vendor)). If you want I can send to you draft of
this chapter (dowloaded from theserverside.com, but now, as i see, it not
avaible for dowloading).
some interesting way you can find on
http://www.theserverside.com/patterns/index.jsp

Best Regards,
Alexander Horuzhiy
----- Original Message -----
From: "Alvin Wang" <
[EMAIL PROTECTED]>
To: <
[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 9:03 PM
Subject: Re: High performance synchronized counter?


> So what should I do in clustered environment? Also is db sequence feature
> depends on db vendor?
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Gene Chuang
> Sent: Tuesday, March 19, 2002 1:34 PM
> To:
[EMAIL PROTECTED]
> Subject: Re: High performance synchronized counter?
>
>
> Try db sequence?  You'll find your counter worthless the moment you
upgrade
> your
> enterprise app to a clustered environment.
>
> Gene
> --- Alvin Wang <
[EMAIL PROTECTED]> wrote:
> > Hi! Gurus,
> >
> > I implemented a synchronized counter (for example Order ID) using Entity
> > bean and use exclusive concurrency control perperty in WL to ganrantee
> that
> > only one transacation is reading/writing that bean at one time point, so
> > that the generated order id will not duplicate. However, I found it is a
> > bottleneck. So what is the better design to improve the performance? Or
is
> > there other way to generate non-duplicate ID strings?
> >
> > Thanks!
> >
> >
>
===========================================================================
> > 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".
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
>
http://sports.yahoo.com/
>
>
===========================================================================
> 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