-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Spring setup to documentation (ideas included) #62
Comments
Hey thanks for that! Is this limited to particular versions of Spring and/or Hibernate? |
I'm currently using ORM 4.2.12.Final and Spring 3.2.8.RELEASE, but it shouldn't matter too much. Since you're directly feeding the HikariDataSource to the LocalSessionFactoryBean#setDataSource, specific versions are less important. It sidesteps the HikariCP <-> Hibernate integration (at least w/ respect to the ConnectionProvider, etc.) entirely. |
Quick blog post with more info: http://www.3riverdev.com/blog/tutorial-spring-hibernate-hikaricp/ |
Also for what it's worth (somewhat different topic), I branched HikariCP for use with ORM 4.2.x, since our ConnectionProvider SPI is slightly different there. Not sure if you'd want to do anything with it, but what the heck: https://github.com/brmeyer/HikariCP/tree/HibernateORM4.2 There will continue to be many users who won't upgrade to 4.3 for a while, largely due to Spring not supporting it until version 4 (in addition to other frameworks). |
Added documentation to the wiki. |
Hey @brettwooldridge, finally getting around to playing with HikariCP/Hibernate on a non-profit I support (nlfw.org). Working beautifully so far. Very, very glad to delete C3P0 from the dependencies ;)
For what it's worth, this is my Spring configuration. It might be beneficial to throw something like this in your docs.
https://gist.github.com/brmeyer/bbb8688658dd71752738
Note that I'm using the annotation-based Spring configuration, but the concepts would be similar through XML.
Just thought I'd throw that out there!
The text was updated successfully, but these errors were encountered: