Scala connection pool library?

落花浮王杯 提交于 2019-12-30 09:56:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!