Can anyone give me an advice which id Generator to use within EJB's?
increment: The documentation gives the advice 'Do not use in a cluster', but we have a cluster -> NO
identity and sequence: Depends on the database, but I want to be database independent! -> NO
hilo: Documentation says 'Do not use this generator with connections enlisted with JTA or with a user-supplied connection' but I use EJB's so I have JTA! -> NO
uuid.hex: Could be used, but char(32) keys are quite inefficient. -> YES
So the only solution to me seems an unefficient uuid.hex generator. As listed in a previous post the HILO EJB doesn't seem to work using Hibernate within MBeans!
Can anyone give me an advice?
Thx Rene!
|