Question

There is a project in Scala for Play 2.0. I've met a known bug with bonecp 0.7.1 database connections and want to upgrade this library to version 0.8.0. In file /project/plugins.sbt I've added the following:

resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

libraryDependencies += "com.jolbox" % "bonecp" % "0.8.0-rc2-SNAPSHOT"

But after compilation and distrib building I get an archive with bonecp 0.7.1 in it. What should I do to make Play Framework use bonecp 0.8.0?

Was it helpful?

Solution

In Build.scala add in in appDependencies

"com.jolbox" % "bonecp" % "0.8.0-rc1",  
"org.reflections" % "reflections" % "0.9.8"

OTHER TIPS

If it's the same bug, we have resolved it by adding the following to our application.conf

# There's a bug in BoneCP 0.7.1: It doesn't actually close expired 
# connections until garbage collection, so they leak. If the application 
# is quiet, garbage collection runs may be very far out (days). We work
# around it by not expiring connections.
# See https://groups.google.com/forum/#!topic/play-framework/RM1QwOFz-2A for 
# more info

db.default.maxConnectionAge=0

For completeness, the link: https://groups.google.com/forum/#!topic/play-framework/RM1QwOFz-2A

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top