Merge branch 'dev' of github.com-brettwooldridge:brettwooldridge/HikariCP

pull/489/merge
Brett Wooldridge 9 years ago
commit 317a0c1534

@ -1,4 +1,9 @@
<h1>![](https://github.com/brettwooldridge/HikariCP/wiki/Hikari.png) HikariCP<sup><sup>&nbsp;It's Faster.</sup></sup><sub><sub><sup>Hi·ka·ri [hi·ka·'lē] &#40;*Origin: Japanese*): light; ray.</sup></sub></sub></h1><br>[![Build Status](https://travis-ci.org/brettwooldridge/HikariCP.svg?branch=master)](https://travis-ci.org/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'>[![Issue Stats](http://issuestats.com/github/brettwooldridge/HikariCP/badge/issue?style=flat&concise=true)](http://issuestats.com/github/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'>[![Issue Stats](http://issuestats.com/github/brettwooldridge/HikariCP/badge/pr?style=flat&concise=true)](http://issuestats.com/github/brettwooldridge/HikariCP)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'>[![Coverage Status](https://coveralls.io/repos/brettwooldridge/HikariCP/badge.svg?branch=master)](https://coveralls.io/r/brettwooldridge/HikariCP?branch=master)<img src='https://raw.github.com/wiki/brettwooldridge/HikariCP/space60x1.gif' width='3px'>[![Dependency Status](https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0/badge.svg?style=flat)](https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0)
<h1>![](https://github.com/brettwooldridge/HikariCP/wiki/Hikari.png) HikariCP<sup><sup>&nbsp;It's Faster.</sup></sup><sub><sub><sup>Hi·ka·ri [hi·ka·'lē] &#40;*Origin: Japanese*): light; ray.</sup></sub></sub></h1><br>
[![][Build Status img]][Build Status]
[![][Issue Stats img]][Issue Stats]
[![][Coverage Status img]][Coverage Status]
[![][Dependency Status img]][Dependency Status]
[![][license img]][license]
Fast, simple, reliable. HikariCP is a "zero-overhead" production ready JDBC connection pool. At roughly 90Kb, the library is very light. Read about [how we do it here](https://github.com/brettwooldridge/HikariCP/wiki/Down-the-Rabbit-Hole).
@ -290,9 +295,8 @@ unnecessary with modern database drivers to implement a cache at the pool level.
Like Statement caching, most major database vendors support statement logging through
properties of their own driver. This includes Oracle, MySQL, Derby, MSSQL, and others. Some
even support slow query logging. We consider this a "development-time" feature. For those few
databases that do not support it, [jdbcdslog-exp](https://code.google.com/p/jdbcdslog-exp/) is
a good option. Great stuff during development and pre-Production.
even support slow query logging. For those few databases that do not support it, [log4jdbc](https://github.com/arthurblake/log4jdbc) or [jdbcdslog-exp](https://code.google.com/p/jdbcdslog-exp/) are
good options.
----------------------------------------------------
@ -411,3 +415,18 @@ YourKit supports open source projects with its full-featured Java Profiler. Cli
### Contributions
Please perform changes and submit pull requests from the ``dev`` branch instead of ``master``. Please set your editor to use spaces instead of tabs, and adhere to the apparent style of the code you are editing. The ``dev`` branch is always more "current" than the ``master`` if you are looking to live life on the edge.
[Build Status]:https://travis-ci.org/brettwooldridge/HikariCP
[Build Status img]:https://travis-ci.org/brettwooldridge/HikariCP.svg?branch=master
[Issue Stats]:http://issuestats.com/github/brettwooldridge/HikariCP
[Issue Stats img]:http://issuestats.com/github/brettwooldridge/HikariCP/badge/issue?style=flat&concise=true
[Coverage Status]:https://coveralls.io/r/brettwooldridge/HikariCP?branch=master
[Coverage Status img]:https://coveralls.io/repos/brettwooldridge/HikariCP/badge.svg?branch=master
[Dependency Status]:https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0
[Dependency Status img]:https://www.versioneye.com/user/projects/551ce51c3661f1bee50004e0/badge.svg?style=flat
[license]:LICENSE
[license img]:https://img.shields.io/badge/License-Apache%202-blue.svg

@ -41,7 +41,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<felix.bundle.plugin.version>3.0.0</felix.bundle.plugin.version>
<felix.version>5.2.0</felix.version>
<felix.version>5.4.0</felix.version>
<hibernate.version>5.0.2.Final</hibernate.version>
<javassist.version>3.20.0-GA</javassist.version>
<jndi.version>0.11.4.1</jndi.version>
@ -325,7 +325,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<version>2.19</version>
<configuration>
<!-- Sets the VM argument line used when unit tests are run. -->
<argLine>${surefireArgLine}</argLine>

@ -787,9 +787,12 @@ public class HikariConfig implements HikariConfigMXBean
validationTimeout = connectionTimeout;
}
if (minIdle < 0 || minIdle > maxPoolSize) {
if (minIdle < 0) {
minIdle = maxPoolSize;
}
else if (minIdle > maxPoolSize) {
maxPoolSize = minIdle;
}
if (maxLifetime < 0) {
LOGGER.error("maxLifetime cannot be negative.");
@ -806,6 +809,7 @@ public class HikariConfig implements HikariConfigMXBean
}
if (idleTimeout + TimeUnit.SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0) {
LOGGER.warn("idleTimeout is close to or greater than maxLifetime, disabling it.");
maxLifetime = idleTimeout;
idleTimeout = 0;
}
if (maxLifetime == 0 && idleTimeout == 0) {

@ -269,13 +269,12 @@ public class TestConnectionTimeoutRetry
@Before
public void before()
{
TestElf.setSlf4jTargetStream(HikariPool.class, System.err);
TestElf.setSlf4jLogLevel(HikariPool.class, Level.INFO);
}
@After
public void after()
{
System.getProperties().remove("com.zaxxer.hikari.housekeeping.periodMs");
TestElf.setSlf4jLogLevel(HikariPool.class, Level.WARN);
}
}

Loading…
Cancel
Save