Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Hubert Klein Ikkink (aka Mr.Haki) - Communications Officer
 Mr.Haki's JBuilder Jar #35
See Also: JBuilder Papers

Generating a UID
When we need a unique identifier we can use the UID class found in the java.rmi.server package. This class will generate an identifier that is unique to the host it is generated on. The generated UID is unique under the following conditions:

For example it is perfect for use within servlets to create a unique id for a visitor.

The following line of code shows an example on how to use this class:

  String uid = new java.rmi.server.UID().toString();

This webpage © 1997-2009 by Bob Swart (aka Dr.Bob - All Rights Reserved.