Skip to content

Commit 54a0e20

Browse files
author
Vitalii Samolovskikh
committed
MongoDB
1 parent e6205c4 commit 54a0e20

File tree

3 files changed

+4
-59
lines changed

3 files changed

+4
-59
lines changed

grails-app/conf/AsynchronousMailConfig.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ asynchronous.mail.override = false
88
asynchronous.mail.clear.after.sent = false
99
asynchronous.mail.disable = false
1010
asynchronous.mail.useFlushOnSave = true
11-
asynchronous.mail.useMongo = false
11+
asynchronous.mail.useMongo = true
1212
asynchronous.mail.gparsPoolSize = 1
1313
asynchronous.mail.newSessionOnImmediateSend = false

grails-app/conf/BuildConfig.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ grails.project.dependency.resolution = {
6363
compile ':cache:1.1.2'
6464

6565
// plugins needed at runtime but not for compilation
66-
runtime ":hibernate:3.6.10.15" // or ":hibernate4:4.3.5.2"
67-
runtime ":database-migration:1.4.0"
66+
//runtime ":hibernate:3.6.10.15" // or ":hibernate4:4.3.5.2"
67+
//runtime ":database-migration:1.4.0"
68+
compile ':mongodb:3.0.1'
6869
runtime ":jquery:1.11.1"
6970
runtime ":resources:1.2.7"
7071
// Uncomment these (or add new ones) to enable additional resources capabilities

grails-app/conf/DataSource.groovy

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +0,0 @@
1-
dataSource {
2-
pooled = true
3-
jmxExport = true
4-
driverClassName = "org.h2.Driver"
5-
username = "sa"
6-
password = ""
7-
}
8-
hibernate {
9-
cache.use_second_level_cache = true
10-
cache.use_query_cache = false
11-
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
12-
// cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
13-
singleSession = true // configure OSIV singleSession mode
14-
}
15-
16-
// environment specific settings
17-
environments {
18-
development {
19-
dataSource {
20-
dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
21-
url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
22-
}
23-
}
24-
test {
25-
dataSource {
26-
dbCreate = "update"
27-
url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
28-
}
29-
}
30-
production {
31-
dataSource {
32-
dbCreate = "update"
33-
url = "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
34-
properties {
35-
// See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
36-
jmxEnabled = true
37-
initialSize = 5
38-
maxActive = 50
39-
minIdle = 5
40-
maxIdle = 25
41-
maxWait = 10000
42-
maxAge = 10 * 60000
43-
timeBetweenEvictionRunsMillis = 5000
44-
minEvictableIdleTimeMillis = 60000
45-
validationQuery = "SELECT 1"
46-
validationQueryTimeout = 3
47-
validationInterval = 15000
48-
testOnBorrow = true
49-
testWhileIdle = true
50-
testOnReturn = false
51-
jdbcInterceptors = "ConnectionState"
52-
defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
53-
}
54-
}
55-
}
56-
}

0 commit comments

Comments
 (0)