Skip to content

Commit

Permalink
[playframework#754] Disable bonecp release helper threads
Browse files Browse the repository at this point in the history
  • Loading branch information
jroper committed Nov 1, 2012
1 parent b24d1a5 commit 98fc11f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions framework/src/play-jdbc/src/main/scala/play/api/db/DB.scala
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ private[db] class BoneCPApi(configuration: Configuration, classloader: ClassLoad
datasource.setMaxConnectionAge(conf.getMilliseconds("maxConnectionAge").getOrElse(1000 * 60 * 60), java.util.concurrent.TimeUnit.MILLISECONDS)
datasource.setDisableJMX(conf.getBoolean("disableJMX").getOrElse(true))
datasource.setIdleConnectionTestPeriod(conf.getMilliseconds("idleConnectionTestPeriod").getOrElse(1000 * 60), java.util.concurrent.TimeUnit.MILLISECONDS)
// Release helper threads has caused users issues, and the feature has been removed altogether from BoneCP 0.8.0
// (which is yet to be released) because it offered no real performance advantage. Once we upgrade to BoneCP 0.8.x,
// we can remove this line. https://play.lighthouseapp.com/projects/82401/tickets/754-cannot-set-important-bonecp-parameter-in-configuration
datasource.setReleaseHelperThreads(0)

conf.getString("initSQL").map(datasource.setInitSQL(_))
conf.getBoolean("logStatements").map(datasource.setLogStatementsEnabled(_))
Expand Down

0 comments on commit 98fc11f

Please sign in to comment.