Hi
I want to create a unique id in my application. Currently we are using System.currentTimeMillis() for this purpose. But, we have 2 application servers running and there is a possibility that the ids generated on different machines could be same though it is rare. Is there a better way of generating a unique id?
thanx
Bharat
-
Unique Id. (2 messages)
- Posted by: Bharat Gandhari
- Posted on: February 01 2002 11:28 EST
Threaded Messages (2)
- Unique Id. by Gal Binyamini on February 01 2002 15:59 EST
- Unique Id. by Thandaveswaran Venkatraman on February 08 2002 10:03 EST
-
Unique Id.[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: February 01 2002 15:59 EST
- in response to Bharat Gandhari
Check out the high/low pattern in the Patterns section -
Unique Id.[ Go to top ]
- Posted by: Thandaveswaran Venkatraman
- Posted on: February 08 2002 10:03 EST
- in response to Bharat Gandhari
U can try using Random class under the util package for the generation of unique numbers.