2013-03-26 126 views
3

在Scala中有一個Play 2.0項目。我遇到了一個與bonecp 0.7.1數據庫連接有關的已知bug,並且希望將此庫升級到0.8.0版本。 在/project/plugins.sbt我已經添加了以下文件:Play Framework 2.0。升級bonecp

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

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

但是編譯和DISTRIB建成後我得到它bonecp 0.7.1存檔。我應該怎麼做才能使Play Framework使用bonecp 0.8.0?

回答

7

在Build.scala添加在appDependencies

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

就是這樣!謝謝。 – tilex 2013-03-27 13:09:34

6

如果是同樣的錯誤,我們通過添加解決它下面我們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 

爲了完整起見,鏈接:https://groups.google.com/forum/#!topic/play-framework/RM1QwOFz-2A

+0

是的,這是同樣的錯誤。但我不想用黑客來繞過這個錯誤。我想升級bonecp,但不知道如何。 – tilex 2013-03-27 06:18:16