4 Replies Latest reply on Jun 17, 2009 10:08 AM by Gregory Nikle

    dynamic parameters in persistence.xml

    Mark Wigmans Newbie
      A typical part of a persistence.xml looks like

      <persistence-unit name="db">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:/dbDatasource</jta-data-source>
      <properties>
      <property name="hibernate.cache.use_second_level_cache" value="true" />
      <property name="hibernate.hbm2ddl.auto" value="update" />
      </persistence-unit>
      ..


      The question I have is, how to dynamic configure a property that is in the given file. So no hardcoded 'hibernate.hbm2ddl.auto' value 'update' but defined in an external properties file.

      Thanks in advance.