JPA + Hibernate abusando das conexões

0 respostas
overkill

Bom dia,

Pessoal estou usando JPA + Hibernate o detalhe é que cada vez que dou um undeploy e deploy ele incrementa 5 conexoes com o banco (postgresql), acredito que seja alguma configuração do C3po comente por favor abaixo a configuração.

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" 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_1_0.xsd">
    <persistence-unit name="xxxPU" transaction-type="RESOURCE_LOCAL">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <properties>
            <property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
            <property name="hibernate.connection.username" value="teste"/>
            <property name="hibernate.connection.password" value="teste"/>
            <property name="hibernate.connection.url" value="jdbc:postgresql://192.168.254.11:5432/xxx" />
            <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
            <property name="cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
            <property name="hibernate.show_sql" value="false"/>
            <property name="hibernate.c3p0.min_size"  value="5"/>
            <property name="hibernate.c3p0.max_size" value="10"/>
            <property name="hibernate.c3p0.timeout"  value="300"/>
            <property name="hibernate.c3p0.max_statements"  value="60"/>
            <property name="hibernate.c3p0.idle_test_period"  value="3000"/>
        </properties>
    </persistence-unit>
</persistence>
Criado 16 de junho de 2008
Respostas 0
Participantes 1