1 Reply Latest reply on Apr 9, 2008 10:54 AM by kukeltje

    schema operation added to hibernate configuration binding

    aguizar

      For testing the ejb timer session, I wanted to enable automatic schema creation, so I set hibernate.hbm2ddl.auto to create. I also configured container managed transactions. Unfortunately, Hibernate's SchemaExport insists on enabling autocommit on the JDBC connection, which is not allowed in a CMT environment.

      I saw a comment in HibernateConfigurationBinding about adding a boolean schema-update attribute. So I went ahead and added it myself to work around the autocommit issue. However, I called it schema-operation to match Hibernate's behavior more closely. The possible values are create, update and validate. Currently only create is implemented, but it does work under CMT.

      What do y'all think about the attribute name and the supported values?

        • 1. Re: schema operation added to hibernate configuration bindin
          kukeltje

          sounds interesting, especially when combined with a kind of 'setup' application.
          - deploy the war/ear
          - go to the url /pvm/setup
          - fill in some values (e.g. select database type and datasource name or separate connection params)

          then automagically the setup app

          - populates the database with default users
          - deploys the demo process
          - ...

          This would make it much more easy for beginners to get up and running...