Generating a globally unique identifier in Java
问题 Summary: I\'m developing a persistent Java web application, and I need to make sure that all resources I persist have globally unique identifiers to prevent duplicates. The Fine Print: I\'m not using an RDBMS, so I don\'t have any fancy sequence generators (such as the one provided by Oracle) I\'d like it to be fast, preferably all in memory - I\'d rather not have to open up a file and increment some value It needs to be thread safe (I\'m anticipating that only one JVM at a time will need to