bonjour,
voila j'ai configuré C3p0 dans hibernate, et quand je regarde mon fichier de log j'ai :
voila ma config ça et aider je pense :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 24458 [http-8080-2] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 <session-factory> <!-- Minimum number of Connections a pool will maintain at any given time. --> <property name="c3p0.minPoolSize">10</property> <!-- Maximum number of Connections a pool will maintain at any given time. --> <property name="c3p0.maxPoolSize">300</property> <!-- Number of Connections a pool will try to acquire upon startup. --> <property name="c3p0.initialPoolSize">30</property> <!-- The size of c3p0's global PreparedStatement cache. --> <property name="c3p0.maxStatements">50</property> <!-- Determines how many connections at a time c3p0 will try to acquire when the pool is exhausted. --> <property name="c3p0.acquireIncrement">10</property> <!-- Defines how many times c3p0 will try to acquire a new Connection from the database before giving up. If this value is less than or equal to zero, c3p0 will keep trying to fetch a Connection indefinitely. --> <property name="c3p0.acquireRetryAttempts">10</property> <!-- If this is a number greater than 0, c3p0 will test all idle, pooled but unchecked-out connections, every this number of seconds. --> <property name="c3p0.idleConnectionTestPeriod">300</property> <!-- Seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire. --> <property name="c3p0.maxIdleTime">300</property> <property name="show_sql">false</property> <property name="hibernate.bytecode.use_reflection_optimizer">false</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql:///gvw</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <property name="current_session_context_class">thread</property>
Partager