1 Reply Latest reply on Jun 24, 2005 2:34 AM by murtuza52

    Tables deleted from the Database

    leonell

      In EJB3 package (ejb3 extension) in META-INF folder is file "hibernate.properties" .
      In this file you can instruct Jboss (Hibernate) how to automatically manage entity beans with setting of hibernate.hbm2ddl.auto property.

      - hibernate.hbm2ddl.auto=create
      Create new empty tables on deploy (also Jboss start)

      - hibernate.hbm2ddl.auto=update
      Update existing tables if possible, and leave data without change .

      - hibernate.hbm2ddl.auto=create-drop
      Create new empty tables on deploy (also Jboss start) and destroy on undeploy(also Jboss end).

      If no hibernate.hbm2ddl.auto property exists (or is commented) then no changes to database are made with deploy/undeploy operation.

      If in EJB3 file does not exist any hibernate.properties file (may be your situation with demos), then default settings from /var/jboss/server/all/deploy/ejb3.deployer/META-INF/hibernate.properties file is used.

      Hope it helps.

      Leonell