Permalink
Browse files

Added configuration using properties.

  • Loading branch information...
1 parent 4a6d984 commit e8c474fa4c904b2f5a53af15d3a984512ed6b70b @erikrozendaal committed Mar 25, 2011
@@ -0,0 +1,4 @@
+jdbc.url=jdbc:mysql://localhost:3306/es2_dev
+jdbc.driver=com.mysql.jdbc.Driver
+jdbc.user=root
+jdbc.password=
@@ -0,0 +1,3 @@
+jdbc.url=jdbc:mysql://localhost:3306/es2
+jdbc.user=root
+jdbc.password=
@@ -43,17 +43,19 @@ object Application {
result
}
- val jdbcUrl = "jdbc:mysql://localhost:3306/es2"
- val jdbcDriver = "com.mysql.jdbc.Driver"
+ val jdbcUrl = Props.get("jdbc.url", "jdbc:mysql://localhost:3306/es2_dev")
+ val jdbcDriver = Props.get("jdbc.driver", "com.mysql.jdbc.Driver")
+ val jdbcUser = Props.get("jdbc.user", "root")
+ val jdbcPassword = Props.get("jdbc.password", "")
Class.forName(jdbcDriver)
val c3p0 = new ComboPooledDataSource
c3p0.setDriverClass(jdbcDriver)
c3p0.setJdbcUrl(jdbcUrl)
- c3p0.setUser("root")
- c3p0.setPassword("")
- c3p0.setInitialPoolSize(100)
+ c3p0.setUser(jdbcUser)
+ c3p0.setPassword(jdbcPassword)
+ c3p0.setInitialPoolSize(1)
c3p0.setMaxPoolSize(100)
SessionFactory.concreteFactory = Some {
@@ -2,7 +2,7 @@
#Thu Feb 10 20:56:36 CET 2011
project.organization=com.zilverline
project.name=es2
-sbt.version=0.7.5.RC0
+sbt.version=0.7.5.RC1
project.version=0.1-SNAPSHOT
build.scala.versions=2.8.1
project.initialize=false
@@ -1,3 +1,3 @@
#Project properties
-#Fri Mar 18 21:42:56 CET 2011
+#Fri Mar 25 19:46:09 CET 2011
plugin.uptodate=true

0 comments on commit e8c474f

Please sign in to comment.