Description:
With mysql-connector-java-3.0.10-stable-bin.jar autoReconnect worked.
This is no longer the case with mysql-connector-java-3.1.12-bin.jar.
Even not with enables:
- enableDeprecatedAutoreconnect=true
- autoReconnect=true
- autoReconnectForPools=true
How to repeat:
.
Suggested fix:
It's mentioned in the release note that autoReconnect will no longer be supported.
As a developer it would be nice to have choice (and your implementation is more efficient then mine).
Please restore this as a feature and include the following in the documentation?
http://bugs.mysql.com/bug.php?id=5020
If the argument is that there might be a transaction going, then a pretty simple
case can be made:
- If the connection is in autoCommit mode, it's safe to autoReconnect.
- If the connection is not in autoCommit mode, but there is no open transaction,
it's safe to autoReconnect (since the connection may be pooled).
- If the connection is not in autoCommit mode, and there is an open transaction,
then throw an exception.