Presently the Entity stuff does this strange key generation gambit. It should instead use the JBoss support. I lean towards just using database sequence support, but for some reason we do a REAL stupid thing with the way JBoss support sequences. Sequence support in JBossCMP makes you write what is essentially database specific stuff in the jbosscmp-jdbc.xml. We could provide each major one and comment it out.