source: trunk/grails-app/conf/DataSource.groovy @ 153

Last change on this file since 153 was 149, checked in by gav, 15 years ago

Refactor bootstrap data generation to new CreateDataService?.
Tweak security annotations so that ROLE_AppAdmin gives access to all areas.
Rework DataSource? to allow building of prod and dev WARs.
Include MySQL jdbc connector which is GNU GPL'd and used in the prod WAR.

File size: 2.4 KB
RevLine 
[55]1dataSource {
[148]2    pooled = true
[55]3}
4hibernate {
5    cache.use_second_level_cache=true
6    cache.use_query_cache=true
7    cache.provider_class='com.opensymphony.oscache.hibernate.OSCacheProvider'
8}
[81]9
[148]10// Environment specific settings.
[149]11// create-drop: Drop and re-create the database between sessions. Deletes existing data.
12// create:       Create the database if it doesn't exist, but don't modify it if it does. Deletes existing data.
13// update:     Create the database if it doesn't exist, and modify it if it does exist. Keep data.
[55]14environments {
[148]15    development {
16        dataSource {
17            /** HSQLDB - In memory */
[149]18            driverClassName = "org.hsqldb.jdbcDriver"
19            username = "sa"
20            password = ""
[81]21            dbCreate = "create-drop"
22            url = "jdbc:hsqldb:mem:devDB"
[148]23            /** MySQL */
[149]24//             driverClassName = "com.mysql.jdbc.Driver"
25//             username = "gnumimsadmin"
26//             password = "gnumimsadmin"
[148]27//             dbCreate = "create-drop"
28//             url = "jdbc:mysql://host:3306/gnumims_dev"
29        }
30    }
31    test {
32        dataSource {
33            /** HSQLDB - In memory */
[149]34            driverClassName = "org.hsqldb.jdbcDriver"
35            username = "sa"
36            password = ""
[148]37            dbCreate = "update"
38            url = "jdbc:hsqldb:mem:devDb"
39            /** MySQL */
[149]40//             driverClassName = "com.mysql.jdbc.Driver"
41//             username = "gnumimsadmin"
42//             password = "gnumimsadmin"
[148]43//             dbCreate = "update"
44//             url = "jdbc:mysql://host:3306/gnumims_test"
45        }
46    }
47    production {
48        dataSource {
[149]49            /* Delete dbCreate line after setup! */
[148]50            /** HSQLDB - In memory */
[149]51//             driverClassName = "org.hsqldb.jdbcDriver"
52//             username = "sa"
53//             password = ""
54//             dbCreate = "create-drop"
55//             url = "jdbc:hsqldb:mem:devDB"
[148]56            /** HSQLDB - In file */
[149]57//             driverClassName = "org.hsqldb.jdbcDriver"
58//             username = "sa"
59//             password = ""
[148]60//             dbCreate = "update"
61//             url = "jdbc:hsqldb:file:prodDb;shutdown=true"
62            /** MySQL */
[149]63            driverClassName = "com.mysql.jdbc.Driver"
64            username = "gnumimsadmin"
65            password = "gnumimsadmin"
66            dbCreate = "update"
67            url = "jdbc:mysql://gnumimssql01:3306/gnumims_prod"
[148]68        }
69    }
[55]70}
Note: See TracBrowser for help on using the repository browser.