Spotter-VM/sigmah/srv/sigmah/conf/persistence.xml

40 lines
1.9 KiB
XML

<?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">
<persistence-unit name="sigmah-dev" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.archive.autodetection" value="class" />
<!-- Loaded from pom configuration. -->
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="hibernate.connection.driver_class" value="org.postgresql.Driver" />
<property name="hibernate.connection.username" value="sigmah" />
<property name="hibernate.connection.password" value="${SIGMAH_PWD}" />
<property name="hibernate.connection.url" value="jdbc:postgresql://postgres:5432/sigmah" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.format_sql" value="false" />
<!-- validate | update | create | create-drop | {empty} -->
<property name="hibernate.hbm2ddl.auto" value="update" />
<!-- Important : connection pool. -->
<property name="hibernate.connection.provider_class" value="org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider" />
<!-- Connection pool configuration. -->
<!-- https://community.jboss.org/wiki/HowToConfigureTheC3P0ConnectionPool -->
<!-- http://www.mchange.com/projects/c3p0/ -->
<property name="hibernate.c3p0.min_size" value="1" />
<property name="hibernate.c3p0.max_size" value="15" />
<property name="hibernate.c3p0.max_statements" value="100" />
<property name="hibernate.c3p0.timeout" value="0" />
<property name="hibernate.c3p0.acquire_increment" value="1" />
<property name="hibernate.c3p0.numHelperThreads" value="6" />
</properties>
</persistence-unit>
</persistence>