2 Replies Latest reply on Jan 20, 2006 9:54 AM by msherwoo

    SchemaExport - how do i stop it from running?

    msherwoo

      I am new to JBoss, and I'm learning EJB3.0.

      I have created an EJB3.0 EntityBean that is working beautifully hitting the included HSQLDB. Every time I deploy my app, the SchemaExport tool runs. I obviously can't save any data in this fashion.

      How do I stop SchemaExport?

      Thanks in advance.

        • 1. Re: SchemaExport - how do i stop it from running?
          hfarid

          you should not be using hsqldb for persisting your data (there are a lot of articls against using hsqldb for anything... in the end it's your call)

          in persistance.xml

          <entity-manager>
           <name>abc</name>
           <jta-data-source>java:/DefaultDS</jta-data-source>
           <properties>
          ...
          ...
           <property name="hibernate.hbm2ddl.auto" value="update" />
           </properties>
           </entity-manager>
          

          this will update your schema in case of a change, you can replace "update" with "none" so hibernate will not touch your schema and you would get an exception the first time you try to access an object with mismatch persistance layout

          • 2. Re: SchemaExport - how do i stop it from running?
            msherwoo

            Awesome! Thank you!