Yes, it is safe as long as the underlying DB guarantees atomic
sequences.
Andrus
On Jan 5, 2010, at 1:35 AM, Andreas Hartmann wrote:
Hi Cayenne community,
I'm using Cayenne 3.0M6.
Is it safe to use the default primary key generation strategy with
PostgreSQL in a web application cluster, with multiple JVMs
accessing the same database?
IIUC Cayenne fetches the next value from the sequence (which is then
incremented by 20) and uses these 20 keys. So theoretically, no two
Cayenne instances should ever use the same key. Is this assumption
correct?
Thanks a lot for any hints and best regards,
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01