In the jdk there is already a class for UID in the jdk. We're using it for
primary keys.


import java.rmi.server.UID;

public class UUID {
  public static String getUUIDString() {
    UID id = new UID();
    return id.toString();
  }

  public static byte[] getUUIDBytes() {
    return getUUIDString().getBytes();
  }

  private UUID(){
  }
}


Mit freundlichen Gr��en
With kind regards

Ulf Gohde
System Architect
CE Computer Equipment AG     Fon: +49 (0)521 9318-167
Herforder Str. 155a          Fax: +49 (0)521 9318-444
33609 Bielefeld              E-Mail:[EMAIL PROTECTED]
Germany                      http://www.ce-ag.com


> -----Original Message-----
> From: Ring, Harald [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 28, 2000 10:57 AM
> To: [EMAIL PROTECTED]
> Subject: GUID - Generator for primary key
>
>
> Hi all,
> can anyone tell me where I can get a generator for GUIDs (of
> course written
> in Java) which produces unique identifiers which are suitable
> as PK for
> EJBs?
>
> Thanks a lot H.Ring
>
> ==============================================================
> =============
> 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