|
@@ -0,0 +1,47 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+
|
|
|
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
|
|
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
|
|
|
+ version="2.0">
|
|
|
+
|
|
|
+ <!-- Resin datasource -->
|
|
|
+ <persistence-unit name="resin" transaction-type="RESOURCE_LOCAL">
|
|
|
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
|
|
|
+ <jta-data-source>java:comp/env/jdbc/hello_world</jta-data-source>
|
|
|
+
|
|
|
+ <properties>
|
|
|
+ <property name="hibernate.connection.datasource" value="java:comp/env/jdbc/hello_world" />
|
|
|
+ <property name="hibernate.transaction.factory_class"
|
|
|
+ value="org.hibernate.transaction.JTATransactionFactory" />
|
|
|
+ <property name="hibernate.transaction.manager_lookup_class"
|
|
|
+ value="org.hibernate.transaction.ResinTransactionManagerLookup" />
|
|
|
+ </properties>
|
|
|
+ </persistence-unit>
|
|
|
+
|
|
|
+ <!-- Database for tests and local dev mode... -->
|
|
|
+ <persistence-unit name="h2" transaction-type="RESOURCE_LOCAL">
|
|
|
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
|
|
|
+ <properties>
|
|
|
+ <property name="javax.persistence.provider" value="org.hibernate.ejb.HibernatePersistence" />
|
|
|
+ <property name="hibernate.connection.driver_class" value="org.h2.Driver" />
|
|
|
+ <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
|
|
|
+ <!-- you may want to enable the ddl if you do not use migrations. -->
|
|
|
+ <property name="hibernate.hbm2ddl.auto" value="create" />
|
|
|
+ <property name="hibernate.show_sql" value="false" />
|
|
|
+ <property name="hibernate.format_sql" value="false" />
|
|
|
+
|
|
|
+ <!-- Connection Pooling settings -->
|
|
|
+ <property name="hibernate.connection.provider_class"
|
|
|
+ value="org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider" />
|
|
|
+
|
|
|
+ <property name="hibernate.c3p0.max_size" value="100" />
|
|
|
+ <property name="hibernate.c3p0.min_size" value="0" />
|
|
|
+ <property name="hibernate.c3p0.acquire_increment" value="1" />
|
|
|
+ <property name="hibernate.c3p0.idle_test_period" value="300" />
|
|
|
+ <property name="hibernate.c3p0.max_statements" value="0" />
|
|
|
+ <property name="hibernate.c3p0.timeout" value="100" />
|
|
|
+ </properties>
|
|
|
+ </persistence-unit>
|
|
|
+
|
|
|
+</persistence>
|