The way I have done this is to combine stringified version of
java.rmi.server.UID with java.io.INetAddress.  Not as nice as
having a long but, doesn't require any service to create one.

Kirk

-----Original Message-----
From: DaveFord <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, March 24, 2000 11:21 AM
Subject: GuidFactory EJB


>I want to create a GuidFactory EJB. It's purpose will be to generate unique
>ID's for primary keys. The key will consist of:
>
>IP address
>current time in millis
>a counter
>
>The only state maintained by the EJB will be a counter. I don't want the
>current value of the counter to be lost should the server shut down, so I
>was thinking of using an entity bean. But since this will be a singleton,
>there doesn't really need to be a "findByPrimaryKey" method.
>
>So I guess my question is, how would you model this type of bean as an EJB.
>
>Dave Ford
>
>===========================================================================
>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