Unique serial number in a java web application.
Posted
by
Zenzen
on Stack Overflow
See other posts from Stack Overflow
or by Zenzen
Published on 2010-12-23T13:47:06Z
Indexed on
2010/12/23
13:54 UTC
Read the original article
Hit count: 244
I've been wondering what's the correct practice for generating unique ids? The thing is in my web app I'll have a plugin system, when a user registers a plugin I want to generate a unique serial ID for it. I've been thinking about storing all numbers in a DB or a file on the server, generating a random number and checking whether it already exists in the DB/file, but that doesn't seem that good. Are there other ways to do it? Would using the UUID be the preferred way to go?
© Stack Overflow or respective owner