-
1. Re: primary key generation
schaefera Nov 21, 2001 2:28 PM (in response to plightbo)Not as far as I know. This is an old problem and there are various solutions.
Can you tell me why the OpenSymphony's Sequence generator is not working ?
Andy -
2. Re: primary key generation
plightbo Nov 21, 2001 3:53 PM (in response to plightbo)I've decided I'm going to go ahead and just use a GUID generator. Statistically, the odds of repeating an ID are [entitites]/36^30, using the GUID class included in OSCore (same module that OSSequence comes with).
OSSequence doesn't work perfectly with JBoss. There are a few issues I encountered: classpaths.. OSSequence and OSPropertySet have issues deploying if oscore.jar isn't in the jboss/lib directory, even though their MANIFEST files include "lib/oscore.jar" which is included in the .ear file. This doesn't happen with orion.
Also, verifier complains about all sorts of stuff with OSSequence and OSPropertySet. They might work, but I'd rather they deployed a little smoother. I've got CVS access for OpenSymphony, so I might just patch it up and commit the changes.
However, I've been using OSSequence for a while with orion, and I sometimes face problems where an ID already generated is returned, resulting in an EntityAlreadyExsistsException. Until app servers can tie their CMP implementation to the db vendor's sequence generators, I think I'll use GUIDs for now.
-Pat