问题
I'm trying to use Squeryl in a new Scala project. This is my first project in Scala, so I'm looking for a good Scala library to handle connection pooling. Of course I might as well use a Java library. What would be a best fit for SQueryl? Amongst java libraries I'm considering DBCP, C3P0, Proxool and BoneCP, being BoneCP a serious candidate looking at their benchmarks.
回答1:
I've used C3P0 in production for many years, always been rock solid for me. Watch out with your DB driver tho, they can be very flaky.
回答2:
I wrote a blog post about db connection pooling with slick you may find useful:
http://fernandezpablo85.github.io/2013/04/07/slick_connection_pooling.html
回答3:
I know this is an old post, but to keep the answer current, if you need a connection pool and you're writing an application that runs on the JVM, I suggest HikariCP.
来源:https://stackoverflow.com/questions/5080707/scala-connection-pool-library