2 Replies Latest reply on Feb 18, 2004 11:24 PM by terapico

    How does jboss auto generate table for entity bean?

    terapico

      At Exercise 4.1, the workbook says if we use the default db (hypersonic sql), the table for the Entity bean will be generated automatically at deployment time. Is this a JBoss specific feature? Can someone explain on how it works?

      Thanks

        • 1. Re: How does jboss auto generate table for entity bean?
          bill.burke

          actually it works with any database. Read chapter 7 (or is it 6?) for more information. Basically in standardjbosscmp-jdbc.xml there are some config flags <create-table>. No matter what database it is, if create-table is set to true, jboss will try and create the table for the CMP if it does not exist. This will happen on deployment.

          <remove-table> is the opposite. On undeployment of the ejb-jar(shutdown for instance), the table will be dropped.

          Basically you can let JBoss create relationships, constraints etc, without involving a db init sql script.

          Bill

          • 2. Re: How does jboss auto generate table for entity bean?
            terapico

            Thank you. I will read the chapters.