You could avoid clashing with keys generated by the db by using a string type key with a prefix or suffix specific to jBoss, and avoid the clustering problem by using an additional prefix/suffix with a server identifer (hashed hostname, ip, whatever)
Yes, that could work but it is not necessary. Using a tx'ed non-cached entity with batched id's will work better I think. The only drawback is if you really really want all numbers in the sequence to be used (which will not be guaranteed as any id's left in the current batch will be lost on server stop).
 
/Rickard

Reply via email to