J'utilise c3p0-0.9.1.2.jar et veille prolongée 3.2.1. Voici la config hibernate.Hibernate paramètres de configuration c3p0 pas s'affecté à l'exécution
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/oDB</property>
<property name="hibernate.connection.username">oDBUser</property>
<property name="hibernate.connection.zeroDateTimeBehavior">convertToNull</property>
<property name="hibernate.connection.autoReconnect">true</property>
<property name="c3p0.max_size">10</property>
<property name="c3p0.min_size">4</property>
<property name="c3p0.timeout">1800</property>
<property name="c3p0.max_statements">200</property>
<property name="c3p0.maxStatementsPerConnection">5</property>
<property name="c3p0.idle_test_period">1500</property>
<property name="c3p0.acquire_increment">2</property>
<property name="c3p0.testConnectionOnCheckout">true</property>
<property name="c3p0.preferredTestQuery">SELECT 1</property>
Mais je ne pense pas que les params comme maxStatementsPerConnection, testConnectionOnCheckout et preferredTestQuery ont un quelconque effet lors de l'exécution. Devrais-je faire autre chose pour ces params? Voici ce que je reçois dans le journal.
INFO 2010-11-06 19: 04: 37364 Initialiser piscine c3p0 ... [email protected] [ConnectionPoolDataSource -> [email protected] [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> faux, automaticTestTable -> null, breakAfterAcquireFailure -> faux, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0 .impl.DefaultConnectionTester, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> z8kfsx8c99kx7g8xqvs4 | 87400, idleConnectionTestPeriod -> 1500, initialPoolSize -> 4, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExces sConnections -> 0, maxPoolSize -> 10, maxStatements -> 200, maxStatementsPerConnection -> 0, minPoolSize -> 4, nestedDataSource -> [email protected] [description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> z8kfsx8c99kx7g8xqvs4 | b245dc, JDBCURL -> jdbc: mysql: // localhost: 3306/ODB, propriétés -> {= true autoreconnect, user = * , mot de passe = * , zeroDateTimeBehavior = convertToNull}], preferredTestQuery -> null, propertyCycle -> 0, testConnectionOnCheckin -> faux, testConnectionOnCheckout -> faux, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ; userOverrides: {}], datasourcename -> null, factoryClassLocation -> null, identityToken -> z8kfsx8c99kx7g8xqvs4 | 93c5e7, numHelperThreads -> 3]
Merci à l'avance. Goura