Ok, I know this isn't on the exam, but I want to practice coding a few beans before I take the
test, and I ran into a bit of a mire right out of the gate.
In the real world, is there an accepted or standard way of generating primary keys for entity beans?
Assuming a numeric PK...I've considered having a single go-to bean that reads the max value of the PK field in the database and then increments and doles them out. But if I do this as a bean, then every create() called on that bean's home is going to produce a bean that generates duplicates of every other bean in the pool! (more or less)
Static non-final field/method would seem to be an obvious bet, but they're disallowed.
Helper class? Vendor-specific dealie that I don't know about?
This seems like such a basic issue, but I haven't found any posts about it here....