Atomikos Forum |
|
I don't use Spring, only hibernate. How can I set the connectionPoolSize in the hibernate properity file?
Without c3p0, I got mysql timeout error: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was56403 seconds ago.The last packet sent successfully to the server was 56403 seconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. It works fine only with hibernate and c3p0. It seems like c3p0 periodly checks the connection with mysql to keep it alive. thanks!
Hi,
You can't use c3p0 but you can use Atomikos pools. See http://www.atomikos.com/Documentation/HibernateThreeStandalone HTH
You can find the explanation why here: http://www.atomikos.com/Documentation/ExternalConnectionPool
|