I'm in the process of converting our system from BEA WebLogic 8.1 to JBoss 3.2.5. All (almost) have BIGINT primary keys. DB2/400, the RDBMS that our system uses, does not support an autoincrement field so our application has been handling it. In WLS we used an internal PK generator similar to the one described in the EJB Design Patterns book. Each table has a seperate PK table with a single column "SEQUENCE". That table is used to manage the PKs. WebLogic handled all of this internally.
I want to convert to JBoss but I need to figure out how I am going to generate my PKs. I don't mind writing my own PK generator. But how do I register it with JBoss? I noticed that JBoss comes with a UUIDKeyGenerator that you use in your CMP EJB with the <key-generator-factory> tag. How can I use this tag to call my own key generator? I realize that tag references a JNDI name. So how do I register my custom key generator in the JNDI tree so that I can access it?
Thanks in advance for any assistance.
There is HiLo key generator in HEAD (4.0). It should backported to Branch_3_2. For now you could check it out here