Note that Java represents time with millisecond _resolution_ which is not at all the same thing as millisecond _accuracy_ in the real world. Relying upon this sort of thing has the effect of introducing a platform dependency which could make the whole design fall over. For example, on the IBM System/390 mainframe, real world accuracy is limited to one full second, so millisecond resolution just sees the seconds incrementing 0.000, 1.000, 2.000, and so on. -- Mike On 2001-06-26 at 15:57 -0400, Jim Kimball wrote: > If you are looking for a simple unique ID generator that is also (somewhat) > evenly distributed, use a reverse timestamp. Use > System.getCurrentTimeMillis(), turn it into a string, then reverse it. > > If you have performance problems with such a simple algorithm, you might > want to write your own routine to do the reversing of a long without using > the generic String methods. > > Jim _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
- [JBoss-user] Key generation by random numbers bcd
- Re: [JBoss-user] Key generation by random ... Richard Kasperowski
- RE: [JBoss-user] Key generation by ran... Marek Sedliak
- Re: [JBoss-user] Key generation by ran... bcd
- Re: [JBoss-user] Key generation by... danch (Dan Christopherson)
- RE: [JBoss-user] Key generation by... Jim Kimball
- Re: [JBoss-user] Key generatio... danch (Dan Christopherson)
- RE: [JBoss-user] Key gene... Jim Kimball
- RE: [JBoss-user] Key generatio... Jim Archer
- RE: [JBoss-user] Key gene... Jim Kimball
- Re: [JBoss-user] Key generatio... Michael Bilow
- Re: [JBoss-user] Key gene... danch (Dan Christopherson)
- [JBoss-user] remote JNDI tree? Mikhail Akopov
- Re: [JBoss-user] Key generation by... Richard Kasperowski
- Re: [JBoss-user] Key generation by random ... Allen fogleson
- Re: [JBoss-user] Key generation by ran... Jim Archer
- Re: [JBoss-user] Key generation by... Philipp Meier
- RE: [JBoss-user] Key generation by random ... Frank Villarreal
- RE: [JBoss-user] Key generation by random ... RRokytskyy
- Re: [JBoss-user] Key generation by ran... Allen fogleson