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

Last change on this file since 202 was 178, checked in by gav, 15 years ago

Resolve ticket #12 again.
Turn query cache on again since this did not resolve the problem.
Implement fix as per http://jira.codehaus.org/browse/GRAILS-5111, add flush:true to save.
Adjust templates to include above and remove home url.
Re-generate all non detailed views and controllers.
Manually add flush:true and remove home url to detailed views and controllers.

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