commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: how unique is uid generated by version four generater.
Date Sat, 12 Jul 2008 17:19:36 GMT
vijay shanker wrote:
> hi gruop,
> This is my first mail to the list.
> I am part of a team developing a system where i have to generate uid at
> three different platforms. These data should be saved in a single repository
> at the server.
> We are planning to use VersionFourGenerator for uid generation.
> I just wanted to know how can I ensure that the UUIDs generated from three
> different platforms are unique and the will not be any problem when using
> this as primary key in server database.
> i am in the situation to generate uid, as if should always be unique.
I assume you are talking about the commons-id sandbox component.

This component has not been released, so while the code is freely 
available, it is not supported.

In answer to your specific question, there is no guarantee of uniqueness 
in the implementation in a type 4 UUID.  Probablility of collision is 
extremely low, but not impossible, as these are generated using random 
number generators.  If you can use JDK 1.5+, you should consider using 
the JDK-supplied implementation.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message