resthub / resthub-spring-stack

RESThub Spring stack
http://resthub.org/spring-stack.html
Other
121 stars 66 forks source link

Provide multiple connection pools #243

Closed bmeurant closed 10 years ago

bmeurant commented 10 years ago

Today resthub comes with a unique bonecp connection pool, configured with default values.

HikariCP seems to be a good and very powerful alternative and could be proposed to replace BoneCP but it requires Java7 and we do not want to force resthub users to move to Java7.

This PR provides:

Main changes

         <dependency>
            <groupId>org.resthub</groupId>
            <artifactId>resthub-jpa</artifactId>
            <version>${resthub.spring.stack.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.jolbox</groupId>
            <artifactId>bonecp-spring</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>1.2.9</version>
            <optional>true</optional>
        </dependency>

fixes #222, fixes #242

bclozel commented 10 years ago

BTW, I've been told HikariCP does not require JDK7 anymore, even though maximum performance should be expected with JDK7, according to their FAQ. Also, see this Spring Boot issue.

brettwooldridge commented 10 years ago

@bclozel Yes, as of HikariCP 1.3.2 (the current release) we no longer require Java7 (Java6 is now supported). Performance differences are due to improvements in the JVM and nothing inherent to the HikariCP pool itself, and I would expect HikariCP to outperform other pools by a similar margin on Java6. While performance is nice, reliability is most important and is/was always the primary goal of the HikariCP project. In our deployments, we experienced too many stability issues with other pools in production and got sick of it. HikariCP has never had a reported deadlock or livelock.

You may wish to update the HikariCP dependency to 1.3.2.