All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.persistence.xml Maven / Gradle / Ivy

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"
   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
   
   <persistence-unit name="production" transaction-type="RESOURCE_LOCAL">

      <!-- modify this for production -->
      <!-- modify this for production -->
      <!-- modify this for production -->
      <!-- modify this for production -->      
      
      <description>Persistence Unit</description>
	  <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
	  
      <properties>
         <!-- property name="javax.persistence.jdbc.driver" value="org.h2.Driver" /-->
         <property name="javax.persistence.jdbc.driver" value="net.sf.log4jdbc.DriverSpy" />
         <property name="javax.persistence.jdbc.url" value="jdbc:log4jdbc:h2:mem:test" />
         <property name="javax.persistence.jdbc.user" value="sa" />
         <property name="javax.persistence.jdbc.password" value="" />
         <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
         <property name="hibernate.hbm2ddl.auto" value="update" />
         <property name="hibernate.show_sql" value="false" />
         <property name="hibernate.format_sql" value="false" />
         <property name="hibernate.transaction.flush_before_completion" value="true" />
      </properties>
     
   </persistence-unit>   
   
   <persistence-unit name="hibernatefortest" transaction-type="RESOURCE_LOCAL">

      <!-- Keep this for testing with in-memory H2 database -->
      <!-- Keep this for testing with in-memory H2 database -->
      <!-- Keep this for testing with in-memory H2 database -->
      <!-- Keep this for testing with in-memory H2 database -->
      
      <description>Persistence Unit</description>
	  <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
	  
      <properties>
         <!-- property name="javax.persistence.jdbc.driver" value="org.h2.Driver" /-->
         <property name="javax.persistence.jdbc.driver" value="net.sf.log4jdbc.DriverSpy" />
         <property name="javax.persistence.jdbc.url" value="jdbc:log4jdbc:h2:mem:test" />
         <property name="javax.persistence.jdbc.user" value="sa" />
         <property name="javax.persistence.jdbc.password" value="" />
         <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
         <property name="hibernate.hbm2ddl.auto" value="update" />
         <property name="hibernate.show_sql" value="false" />
         <property name="hibernate.format_sql" value="false" />
         <property name="hibernate.transaction.flush_before_completion" value="true" />
      </properties>
     
   </persistence-unit>
</persistence>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy