|
@@ -5,8 +5,8 @@
|
|
|
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
|
|
|
version="2.0">
|
|
|
|
|
|
- <!-- The following config is an example config for mysql -->
|
|
|
- <persistence-unit name="mysql-test" transaction-type="RESOURCE_LOCAL">
|
|
|
+ <!-- Direct mysql -->
|
|
|
+ <persistence-unit name="mysql" transaction-type="RESOURCE_LOCAL">
|
|
|
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
|
|
|
|
|
<properties>
|
|
@@ -29,30 +29,17 @@
|
|
|
</properties>
|
|
|
</persistence-unit>
|
|
|
|
|
|
- <!-- The following config is an example config for mysql -->
|
|
|
- <persistence-unit name="mysql" transaction-type="RESOURCE_LOCAL">
|
|
|
+ <!-- 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.driver_class" value="com.mysql.jdbc.Driver" />
|
|
|
- <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
|
|
|
-
|
|
|
- <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.connection.provider_class"
|
|
|
- value="org.hibernate.connection.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" />
|
|
|
+ <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>
|
|
|
</persistence>
|