Skip to content

Instantly share code, notes, and snippets.

@denen99
Created June 29, 2013 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save denen99/5891383 to your computer and use it in GitHub Desktop.
Save denen99/5891383 to your computer and use it in GitHub Desktop.
val cpdsMaster = {
val props = new Properties
props.load(getClass.getResourceAsStream("/c3p0-master.properties"))
val cpds = new ComboPooledDataSource
cpds.setProperties(props)
logger.info("Created Master c3p0 connection pool")
cpds
}
val cpdsSlave = {
val props = new Properties
props.load(getClass.getResourceAsStream("/c3p0-slave.properties"))
val cpds = new ComboPooledDataSource
cpds.setProperties(props)
logger.info("Created Slave c3p0 connection pool")
cpds
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment