My server has long standing idle periods.  We are seeing:  
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet 
successfully received from the server was...  errors.

I would like to fix it as simply as possible.  MySQL has two properties 
autoReconnect and autoReconnectForPools that might fix the problem.  They both 
default to false and I can't find an easy way to set them.
I had an earlier problem with auto commit and I fixed it with the 
setDefaultAutoCommit method on PoolableConnectionFactory.  But, it doesn't have 
a similar setter for auto reconnect.

The only example I found of setting the autoReconnect property is on the 
connection url.  I use the interface where I pass an instance of Properties, so 
I assume I can set those properties with it.

I am curious if there are better ways to set those properties.

Thanks.

-SP

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to