The "sequential number" is of little consequence, where or how it is stored.
We simply start with 0 when the bean is initially started by the container.
By CRC'ing the number against a timestamp, it does not matter if a sequence
number is reused, just as long as the timestamp is different. This would be
the case if the sequence number was incremented on each subsequent call.

To answer the second part of your question, the bean is an entity bean. No
two clients should be allowed in as long as the bean is deployed as
transaction required.

jim

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Evan Ireland
Sent: Monday, July 12, 1999 4:14 PM
To: [EMAIL PROTECTED]
Subject: Re: Generating unique PK - any suggestions


James Cook wrote:

> If you can settle for a number that is not sequential, I would recommend a
> time-stamp that is CRC'd against a sequential number. Make this an entity
> bean that performs no persistence and you should be fine.

So where do you save the "sequential number", and how do you ensure
that multiple clients do not get their own instance of this entity
bean with their own "sequential number"?

===========================================================================
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".

===========================================================================
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