aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1637385 - in /aries/trunk/jpa: jpa-container-itest/ jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/ jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/ jpa-container-testbundle/ jpa-container-testbundle/sr...
Date Fri, 07 Nov 2014 15:08:28 GMT
Author: cschneider
Date: Fri Nov  7 15:08:27 2014
New Revision: 1637385

URL: http://svn.apache.org/r1637385
Log:
ARIES-1272 Add jpa test with hibernate

Added:
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerHibernateTest.java
Modified:
    aries/trunk/jpa/jpa-container-itest/pom.xml
    aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
    aries/trunk/jpa/jpa-container-testbundle/pom.xml
    aries/trunk/jpa/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml

Modified: aries/trunk/jpa/jpa-container-itest/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container-itest/pom.xml?rev=1637385&r1=1637384&r2=1637385&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-container-itest/pom.xml (original)
+++ aries/trunk/jpa/jpa-container-itest/pom.xml Fri Nov  7 15:08:27 2014
@@ -42,6 +42,11 @@
     <properties>
         <exam.version>3.4.0</exam.version>
         <url.version>1.6.0</url.version>
+        <hibernate42.version>4.2.15.Final</hibernate42.version>
+        <ant.bundle.version>1.8.2_2</ant.bundle.version>
+        <antlr.bundle.version>2.7.7_5</antlr.bundle.version>
+        <dom4j.bundle.version>1.6.1_5</dom4j.bundle.version>
+        <serp.bundle.version>1.14.1_1</serp.bundle.version>
     </properties>
 
     <dependencies>
@@ -151,6 +156,7 @@
             <scope>test</scope>
         </dependency>
 
+        <!-- eclipselink -->
         <dependency>
             <groupId>org.eclipse.persistence</groupId>
             <artifactId>javax.persistence</artifactId>
@@ -216,7 +222,74 @@
             <artifactId>org.apache.servicemix.bundles.serp</artifactId>
             <version>1.13.1_2</version>
         </dependency>
-
+        
+        <!-- hibernate -->
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.antlr</artifactId>
+            <version>${antlr.bundle.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.ant</artifactId>
+            <version>${ant.bundle.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.dom4j</artifactId>
+            <version>${dom4j.bundle.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.serp</artifactId>
+            <version>${serp.bundle.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml</groupId>
+            <artifactId>classmate</artifactId>
+            <version>0.9.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+            <version>3.18.1-GA</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.spec.javax.security.jacc</groupId>
+            <artifactId>jboss-jacc-api_1.4_spec</artifactId>
+            <version>1.0.2.Final</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.logging</groupId>
+            <artifactId>jboss-logging</artifactId>
+            <version>3.1.4.GA</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.common</groupId>
+            <artifactId>hibernate-commons-annotations</artifactId>
+            <version>4.0.4.Final</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jandex</artifactId>
+            <version>1.2.2.Final</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-core</artifactId>
+            <version>${hibernate42.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-entitymanager</artifactId>
+            <version>${hibernate42.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-osgi</artifactId>
+            <version>${hibernate42.version}</version>
+        </dependency>
+        
         <!-- Test bundles -->
         <dependency>
             <groupId>org.apache.aries.jpa</groupId>
@@ -328,7 +401,7 @@
         </dependency>
         <dependency>
             <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-container-native</artifactId>
+            <artifactId>pax-exam-container-forked</artifactId>
             <version>${exam.version}</version>
             <scope>test</scope>
         </dependency>

Added: aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerHibernateTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerHibernateTest.java?rev=1637385&view=auto
==============================================================================
--- aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerHibernateTest.java
(added)
+++ aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/container/itest/JPAContainerHibernateTest.java
Fri Nov  7 15:08:27 2014
@@ -0,0 +1,69 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.aries.jpa.container.itest;
+
+import static org.ops4j.pax.exam.CoreOptions.options;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+
+import org.apache.aries.jpa.container.itest.entities.Car;
+import org.apache.aries.jpa.itest.AbstractJPAItest;
+import org.junit.Test;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+
+public class JPAContainerHibernateTest extends AbstractJPAItest {
+    
+	@Test
+    public void testCarCreateDelete() throws Exception {
+        EntityManagerFactory emf = getEMF(TEST_UNIT);
+        EntityManager em = emf.createEntityManager();
+        em.getTransaction().begin();
+        Car c = new Car();
+        c.setNumberPlate("123456");
+        c.setColour("blue");
+        em.persist(c);
+        em.getTransaction().commit();
+        em.close();
+        
+        em = emf.createEntityManager();
+        em.getTransaction().begin();
+        deleteCar(em, c);
+        em.getTransaction().commit();
+        em.close();
+    }
+
+    private void deleteCar(EntityManager em, Car c) {
+        c = em.merge(c);
+        em.remove(c);
+    }
+
+    @Configuration
+    public Option[] configuration() {
+        return options(
+                baseOptions(),
+                ariesJpa20(),
+                transactionWrapper(),
+                testDs(),
+                testBundle(),
+                // It is important to start hibernate after the testDs
+                // as it will access the DataSource when creating the EMF
+                hibernate()
+                );
+    }
+
+}

Modified: aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java?rev=1637385&r1=1637384&r2=1637385&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
(original)
+++ aries/trunk/jpa/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
Fri Nov  7 15:08:27 2014
@@ -86,7 +86,9 @@ public abstract class AbstractJPAItest e
     private Option ariesJpaInternal() {
         return composite(
                 frameworkProperty("org.osgi.framework.system.packages")
-                        .value("javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,ja
 vax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.soap,
 javax.xml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.TypeCodePackage,org.omg.CORBA.portable,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.Portab
 leServer.POAPackage,org.omg.PortableServer.ServantLocatorPackage,org.omg.PortableServer.portable,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers"),
+                        .value("javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,ja
 vax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.soap,
 "
+                               + "javax.xml.stream; version=1.0,javax.xml.stream.events;
version=1.0,javax.xml.stream.util; version=1.0,"
+                               + "javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.TypeCodePackage,org.omg.CORBA.portable,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.P
 ortableServer.ServantLocatorPackage,org.omg.PortableServer.portable,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers"),
                 
                 mvnBundle("org.ow2.asm", "asm-all"),
 
@@ -159,6 +161,23 @@ public abstract class AbstractJPAItest e
                 mvnBundle("org.apache.openjpa", "openjpa")
                 );
     }
+    
+    protected Option hibernate() {
+        return composite(
+                mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.antlr"),
+                mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.ant"),
+                mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.dom4j"),
+                mvnBundle("org.apache.servicemix.bundles" , "org.apache.servicemix.bundles.serp"),
+                mvnBundle("com.fasterxml", "classmate"),
+                mvnBundle("org.javassist", "javassist"),
+                mvnBundle("org.jboss.logging", "jboss-logging"),
+                mvnBundle("org.hibernate.common", "hibernate-commons-annotations"), 
+                mvnBundle("org.jboss", "jandex"),
+                mvnBundle("org.hibernate", "hibernate-core"),
+                mvnBundle("org.hibernate", "hibernate-entitymanager"),
+                mvnBundle("org.hibernate", "hibernate-osgi")
+                );
+    }
 
     protected Option testDs() {
         return mvnBundle("org.apache.aries.transaction", "org.apache.aries.transaction.testds");

Modified: aries/trunk/jpa/jpa-container-testbundle/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container-testbundle/pom.xml?rev=1637385&r1=1637384&r2=1637385&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-container-testbundle/pom.xml (original)
+++ aries/trunk/jpa/jpa-container-testbundle/pom.xml Fri Nov  7 15:08:27 2014
@@ -41,12 +41,17 @@
     </scm>
 
     <properties>
+        <!-- As this is only a test bundle we skip the check -->
+        <aries.skip.version.check>true</aries.skip.version.check>
+    
         <!-- Export package versions are maintained in packageinfo files -->
         <aries.osgi.export.pkg>
             org.apache.aries.jpa.container.itest.entities
         </aries.osgi.export.pkg>
         <aries.osgi.import>
             javax.persistence;version="[1.0.0,3.0.0)",
+            org.hibernate.proxy;resolution:=optional,
+            javassist.util.proxy;resolution:=optional,
             *
         </aries.osgi.import>
         <aries.osgi.private.pkg />
@@ -60,12 +65,6 @@
             <version>1.1</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.openjpa</groupId>
-            <artifactId>openjpa</artifactId>
-            <version>2.2.2</version>
-            <scope>provided</scope>
-        </dependency>
     </dependencies>
 
     <build>
@@ -79,29 +78,6 @@
                     </instructions>
                 </configuration>
             </plugin>
-            <plugin>
-              <artifactId>maven-antrun-plugin</artifactId>
-              <executions>
-                <execution>
-                  <phase>process-classes</phase>
-                  <configuration>
-                    <tasks>
-                      <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"
classpathref="maven.compile.classpath" />
-                      <openjpac>
-                          <classpath refid="maven.compile.classpath" /> 
-                          <classpath>
-                            <pathelement location="target/classes" />
-                            <pathelement location="src/main/resources" />
-                          </classpath>
-                      </openjpac>
-                    </tasks>
-                  </configuration>
-                  <goals>
-                    <goal>run</goal>
-                  </goals>
-                </execution>
-              </executions>
-            </plugin>
         </plugins>
     </build>
 

Modified: aries/trunk/jpa/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml?rev=1637385&r1=1637384&r2=1637385&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml (original)
+++ aries/trunk/jpa/jpa-container-testbundle/src/main/resources/META-INF/persistence.xml Fri
Nov  7 15:08:27 2014
@@ -24,12 +24,22 @@
   
   <persistence-unit name="test-unit" transaction-type="RESOURCE_LOCAL">
     <description>Test persistence unit for the JPA Container and Context iTests</description>
+    
     <jta-data-source>osgi:service/javax.sql.DataSource</jta-data-source>
     <non-jta-data-source>osgi:service/javax.sql.DataSource</non-jta-data-source>
     <class>org.apache.aries.jpa.container.itest.entities.Car</class>
     <exclude-unlisted-classes>true</exclude-unlisted-classes>
     <properties>
-      
+        <!-- This is to avoid compile time enhancement which would conflict with hibernate
-->
+        <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/>
+    
+        <!-- These properties are creating the database on the fly. We are using them
to avoid the tests having
+          to create a database  -->
+        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+        <property name="openjpa.jdbc.DBDictionary" value="derby"/>
+
+        <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"/>
+        <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
     </properties>
   </persistence-unit>
   
@@ -44,6 +54,9 @@
           to create a database  -->
      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
      <property name="openjpa.jdbc.DBDictionary" value="derby"/>
+     <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"/>
+        <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+        <property name="hibernate.temp.use_jdbc_metadata_defaults" value="false"/>
     </properties>
   </persistence-unit>
   
@@ -58,6 +71,8 @@
           to create a database  -->
      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
      <property name="openjpa.jdbc.DBDictionary" value="derby"/>
+        <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"/>
+        <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
     </properties>
   </persistence-unit>
   
@@ -72,6 +87,8 @@
       <property name="javax.persistence.jdbc.databaseName" value="memory:TEST;create=true"/>
      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
      <property name="openjpa.jdbc.DBDictionary" value="derby"/>
+        <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"/>
+        <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
     </properties>
   </persistence-unit>
   
@@ -86,6 +103,8 @@
       <property name="javax.persistence.jdbc.databaseName" value="memory:TEST;create=true"/>
      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
      <property name="openjpa.jdbc.DBDictionary" value="derby"/>
+        <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyTenSevenDialect"/>
+        <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
     </properties>
   </persistence-unit>
 </persistence>



Mime
View raw message