Skip to content
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

Closed
brmeyer opened this issue Apr 23, 2014 · 5 comments
Closed

Add Spring setup to documentation (ideas included) #62

brmeyer opened this issue Apr 23, 2014 · 5 comments
Assignees

Comments

@brmeyer
Copy link

brmeyer commented Apr 23, 2014

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!

@brettwooldridge
Copy link
Owner

Hey thanks for that! Is this limited to particular versions of Spring and/or Hibernate?

@brmeyer
Copy link
Author

brmeyer commented Apr 23, 2014

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.

@brmeyer
Copy link
Author

brmeyer commented Apr 23, 2014

Quick blog post with more info: http://www.3riverdev.com/blog/tutorial-spring-hibernate-hikaricp/

@brmeyer
Copy link
Author

brmeyer commented Apr 23, 2014

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).

@brettwooldridge
Copy link
Owner

Added documentation to the wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants