1 Reply Latest reply on Jan 27, 2006 7:02 PM by lutfi123456

    Overwriting the database at JBoss startup

    tzablock

      Hi i'm having this kind of issue:
      I'm using JBOSS AS 4.0.3 and Oracle 10g Express Database. I'm preparing a test applilcation with persistance mechanism in EJB3.

      The problem is that whenever I shutdown and run the server, the database data (tables, rows etc) is overwritten with new ones, so everything that was inserted into the tables is deleted.

      The second issue is that I don't want Jboss to create the database each time it gets up - I'd just like to map @Entities to the existing DB schema.

      I'd be grateful for any help.

      tzablock.

        • 1. Re: Overwriting the database at JBoss startup
          lutfi123456

          Try to change the create-table in standardjaws.xml and standardjbosssmp-jdbc.xml to false

          if it doesn't work, try to open persistence.properties at ejb3-deployer\META-INF, deactivate the hibernate.hbm2ddl.auto=create-drop to #hibernate.hbm2ddl.auto=create-drop

          in my case it works

          Sadr LM