Fix a bug reported on Stackoverflow.

pull/190/head
Brett Wooldridge 10 years ago
parent 4c0c9711e1
commit 48e0acb982

@ -14,6 +14,13 @@ Changes in 2.2.5
* Fixed bug in code that sets HikariConfig values from a Properties instance
that prevented defaults from being read properly.
* Fixed an obscure bug in connection creation with a driver that throws an
exception when setTransactionIsolation() is called with the value returned
by getTransactionIsolation(). We now bypass setTransactionIsolation() if
the user has not configured an isolation level (using the default).
* Fix a bug where DataSource.loginTimeout() was always being set to 1 second.
Changes in 2.2.4
* Generate proxy classes into the same protection domain as the HikariCP

@ -326,7 +326,7 @@ public final class PoolUtilities
{
if (connectionTimeout != Integer.MAX_VALUE) {
try {
dataSource.setLoginTimeout((int) TimeUnit.MILLISECONDS.toSeconds(Math.min(1000L, connectionTimeout)));
dataSource.setLoginTimeout((int) TimeUnit.MILLISECONDS.toSeconds(Math.max(1000L, connectionTimeout)));
}
catch (SQLException e) {
logger.warn("Unable to set DataSource login timeout", e);

@ -290,7 +290,7 @@ public final class PoolUtilities
{
if (connectionTimeout != Integer.MAX_VALUE) {
try {
dataSource.setLoginTimeout((int) TimeUnit.MILLISECONDS.toSeconds(Math.min(1000L, connectionTimeout)));
dataSource.setLoginTimeout((int) TimeUnit.MILLISECONDS.toSeconds(Math.max(1000L, connectionTimeout)));
}
catch (SQLException e) {
logger.warn("Unable to set DataSource login timeout", e);

Loading…
Cancel
Save