• Post Reply Bookmark Topic Watch Topic
  • New Topic

UID Generator ?  RSS feed

 
Rikard Qvarforth
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone have a good UID generator ? or a suggest on how to implement one ?
//Thanks Rille
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37462
537
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rikard,
The Uid class will give you an identifier that is unique on the machine you are using. If you need a true unique identifier, you can append the machine's IP.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is an example of code for a distributable universal key generator at TSS here (including links to source code). Note that we used something similar on one of our projects, and I hated it. A lot. It's a very big solution to what may only be a reasonably small problem.
 
Rikard Qvarforth
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply humm and i agree it is a big soulotion on a pretty small problem.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may find that a common database with Connection Pooling and a database managed sequence is enough. I find it usually suffices.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!