It would appear that when using multiple data sources in grails 3 that the default dataSource element is required. We currently define our data sources in a plugin and now we have a dangling new element that is unused as all our domain classes point to a named datasource. In grails 2 we were able to remove the default dataSource block and only provide named data sources. Was this intentional? I can not use the below one, two and three data sources unless I define a dataSource. We can work around this by simply making one and dataSource the same, but this seems redundant.
dataSources:
dataSource:
url: xxxxx
username: xxxxx
password: xxxxx
driverClassName: net.sourceforge.jtds.jdbc.Driver
dialect: org.hibernate.dialect.SQLServerDialect
pooled: true
jmxExport: true
logSql: false
dbCreate: none
properties:
jmxEnabled: true
initialSize: 5
maxActive: 50
minIdle: 5
maxIdle: 25
maxWait: 10000
maxAge: 600000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 120000
validationQuery: SELECT 1
validationQueryTimeout: 3
validationInterval: 15000
testOnBorrow: true
testWhileIdle: true
testOnReturn: false
jdbcInterceptors: ConnectionState
defaultTransactionIsolation: 2
one:
url: xxxxx
username: xxxxx
password: xxxxx
driverClassName: net.sourceforge.jtds.jdbc.Driver
dialect: org.hibernate.dialect.SQLServerDialect
pooled: true
jmxExport: true
logSql: false
dbCreate: none
properties:
jmxEnabled: true
initialSize: 5
maxActive: 50
minIdle: 5
maxIdle: 25
maxWait: 10000
maxAge: 600000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 120000
validationQuery: SELECT 1
validationQueryTimeout: 3
validationInterval: 15000
testOnBorrow: true
testWhileIdle: true
testOnReturn: false
jdbcInterceptors: ConnectionState
defaultTransactionIsolation: 2
two:
url: xxxxx
username: xxxxx
password: xxxxx
driverClassName: net.sourceforge.jtds.jdbc.Driver
dialect: org.hibernate.dialect.SQLServerDialect
pooled: true
jmxExport: true
logSql: false
dbCreate: none
properties:
jmxEnabled: true
initialSize: 5
maxActive: 50
minIdle: 5
maxIdle: 25
maxWait: 10000
maxAge: 600000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 120000
validationQuery: SELECT 1
validationQueryTimeout: 3
validationInterval: 15000
testOnBorrow: true
testWhileIdle: true
testOnReturn: false
jdbcInterceptors: ConnectionState
defaultTransactionIsolation: 2
three:
url: xxxxx
username: xxxxx
password: xxxxx
driverClassName: net.sourceforge.jtds.jdbc.Driver
dialect: org.hibernate.dialect.SQLServerDialect
pooled: true
jmxExport: true
logSql: false
dbCreate: none
properties:
jmxEnabled: true
initialSize: 5
maxActive: 50
minIdle: 5
maxIdle: 25
maxWait: 10000
maxAge: 600000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 120000
validationQuery: SELECT 1
validationQueryTimeout: 3
validationInterval: 15000
testOnBorrow: true
testWhileIdle: true
testOnReturn: false
jdbcInterceptors: ConnectionState
defaultTransactionIsolation: 2