On Wed, 3 Mar 2004, Adkins Kendall wrote: > Here is a UID Generator we are using. Part of the UID contains the hash of > a final static object instance. In this way, while a JVM is up you are > assured no other objects can occupy the same memory address. We have had no > difficulty with it under heavy load across 4 servers each with three JVMs.
Unfortunately, that is incorrect. Nearly every system that runs a JVM uses virtual memory, so each process has its own virtual address address space. In such a case, especially if classes are loaded in the same order, etc., it is very likely that the address will not be unique across different JVMs on a machine. See the bug at http://developer.java.sun.com/developer/bugParade/bugs/4212322.html for an example of where someone at Sun thought the same thing, with a longer description of why it doesn't work and an example that shows it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]