Tell me more ×  I want to generate unique Ids as a key for
multiple physically separated databases.  I use JBoss and I
wonder which implemetation/library is the way to go. I know
java.util.UUID would be simple and probably fine. I'd just like
to know if this is the way to go in JBoss.  Any hints ?
share|improve this question add comment  3 Answers  Looks like
there is an UUID generator in JBoss that can be called using
this code:     InitialContext ctx = new InitialContext();
KeyGeneratorFactory kgf = (KeyGeneratorFactory)
ctx.lookup("UUIDKeyGeneratorFactory");    KeyGenerator kg =
kgf.getKeyGenerator();    Object uuid = kg.generateKey();
share|improve this answer Yes found that one too. But is this
the recommended way to go in JBOSS ? –  mostart Dec 30 '11 at
8:09 add comment  What do you mean by recommended?  UUID is a
standard. There are different kinds of UUID (which are also
defined as standards). It doesn't matter which library or
implementation you use, as long as the generated keys follow the
stan