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.

jim

----- Original Message -----
From: Parsons, Graham - Barclays Funds <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 12, 1999 7:44 AM
Subject: Generating unique PK - any suggestions


> We have a situation where we do not have a "real world" primary key for
data
> represented by an entity bean.
>
> We therefore need to generate one.
>
> How should this be done within the EJB specification ? Is it up to us to
> devise a method (counter table on a database for example) ?
>
> If the later, does anyone have a more elegant solution than that suggested
> above (we are in a peer - peer database replication situation and
therefore
> would need separate key ranges for each database to avoid collision ...
not
> nice).
>
> TIA
>
> Regards,
>
>
> Graham Parsons
>
>
>
> ---------------------------------------------------------------------
> Barclays Funds Ltd, 3rd Floor Gredley House, 11 Broadway, Stratford,
London
> E15 4BJ
> Phone 0181.522.4516,  Fax 0181.522.4239,  Clearway 7.4130.4516
> email: [EMAIL PROTECTED]
>
>
>
>
>


----------------------------------------------------------------------------
----


>
> Internet communications are not secure and therefore the Barclays Group
does
> not accept legal responsibility for the contents of this message. Any
views
> or opinions presented are solely those of the author and do not
necessarily
> represent those of the Barclays Group.
>
>
>

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