3 Replies Latest reply on Jul 24, 2002 1:40 AM by Dain Sundstrom

    JBoss creates tables without being asked

    Jim Hazen Expert

      I've read that there is an option that will tell JBoss to create and optionally remove tables when an EJB is loaded. However I'm seeing the following.

      Deploy a vanilla CMP bean with only an ejb-jar.xml deployment descriptor. No jaws.xml or jboss.xml.

      The

      <abstract-schema-name>sequence</abstract-schema-name>

      line in the descriptor seems to be ignored and a table called sequenceentity is created.

      Have I somehow misconfigured JBoss? Ghost in the machine? In any case how can I get JBoss to use the table in the descriptor and quit creating new ones?

      Using JBoss3.0.1RC1.

      Thanks,
      Jim

        • 1. Re: JBoss creates tables without being asked
          Ben Wong Newbie

          If you haven't done so, take a look at the jbosscmp-jdbc.xml descriptor file. In it, there is a element called <create-table> and <remove-table> which you can specify whether you want JBoss CMP to automatically create or remove the tables for you. The default value for them is true.

          This stuff is documented in the JBossCMP 2.0 documentation written by Dain Sundstrom.

          Hope this help,
          Ben

          • 2. Re: JBoss creates tables without being asked
            Jim Hazen Expert

            Ok. Found the <create-table> field. What field does JBoss use for telling it the table name to interact with? I was under the impression that it was the abstract-schema field. However if this were the case JBoss should have created a table called sequence, not sequenceentity. Does JBoss use another field like ejb-name or something as the table name? Is this standard?

            I'll get the CMP Docs. Tried the other night and the site was flaky (couldn't register/place orders).

            Thanks,
            Jim

            • 3. Re: JBoss creates tables without being asked
              Dain Sundstrom Master

              There are no standards for EJB to SQL mapping. JBoss curently uses the ejb-name for the default table name, as abstract schema name is not required.