1 Reply Latest reply on Jul 31, 2003 3:12 AM by webguy

    Auto-increment / jboss 3.2.1 / Hypersonic

    webguy Newbie

      Hi, I'm just messing about with the Jboss-ejb-workbook from O'reilly, and I'm changing one of the entitybeans to use a auto-increment, with the Hypersonic SQL database.

      I've added the <auto-increment/> and

      <!-- retrieves generated key of the record inserted into hsql db -->
      <entity-command name="hsqldb-fetch-key"

      to the jbosscmp-jdbc.xml

      I'm getting the error "Template not found" in the console when I deploy it to Jboss.

      I'm guessing I'm missing a jar in the servers/default/lib?
      That right? What one?

      2 more questions on key generation. Is there a classes with Jboss that I can use to do


      I'm guessing uuid-key-generator.sar has something to do with that..

      Also if I want to plugin a custom class that does generation, what do I need to do?

      Thanks WG

        • 1. Re: Auto-increment / jboss 3.2.1 / Hypersonic
          webguy Newbie

          Ok here is an update. It seems you need to overwrite the defult Hypersonic settings adding the pk-template .

          In addition the XML declaration for the DTD (jboss-jdbc 3.2) need to be commented out as the it doesn't include the pk entity and will cause deployment to fail, with a XML Validation error.

          You can just use <entity-command name="hsqldb-fetch-key"/> in place of the longer declaration as above..