1<?xml version="1.0" encoding="UTF-8" ?> 2<persistence xmlns="http://java.sun.com/xml/ns/persistence" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 5 http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> 6 7 <!-- JPA test "unit" --> 8 <persistence-unit name="testUnit" transaction-type="RESOURCE_LOCAL"> 9 <provider>org.hibernate.ejb.HibernatePersistence</provider> 10 11 <class>com.google.inject.persist.jpa.JpaTestEntity</class> 12 <class>com.google.inject.persist.jpa.JpaParentTestEntity</class> 13 <exclude-unlisted-classes>true</exclude-unlisted-classes> 14 15 <properties> 16 <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/> 17 <property name="hibernate.connection.url" value="jdbc:hsqldb:mem:persistence"/> 18 <property name="hibernate.connection.username" value="sa"/> 19 <property name="hibernate.connection.password" value=""/> 20 <property name="hibernate.connection.pool_size" value="2"/> 21 <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> 22 <property name="hiberante.cache_provider" value="org.hibernate.cache.NoCacheProvider"/> 23 24 <property name="hibernate.hbm2ddl.auto" value="create"/> 25 </properties> 26 </persistence-unit> 27 28 <persistence-unit name="testProperties" transaction-type="RESOURCE_LOCAL"> 29 <provider>org.hibernate.ejb.HibernatePersistence</provider> 30 31 <class>com.google.inject.persist.jpa.JpaTestEntity</class> 32 <class>com.google.inject.persist.jpa.JpaParentTestEntity</class> 33 <exclude-unlisted-classes>true</exclude-unlisted-classes> 34 35 <properties> 36 <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> 37 <property name="hibernate.id.new_generator_mappings" value="true"/> 38 <property name="hibernate.hbm2ddl.auto" value="create-drop"/> 39 </properties> 40 </persistence-unit> 41 42</persistence> 43 44