Advertisement
Guest User

Untitled

a guest
Sep 11th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 9.37 KB | None | 0 0
  1. dataSource {
  2.     pooled = true
  3.     //jmxExport = true
  4.     driverClassName = 'com.mysql.jdbc.Driver'
  5.     dialect = br.com.eteg.mysqldialect.MySQLInnoDBExtendedDialect.class
  6.     username = 'root'
  7.     password = 'teste-123'
  8.     //logSql = true
  9.     properties {
  10.         validationQuery = 'SELECT 1'
  11.         testOnBorrow = true
  12.         testWhileIdle = true
  13.         testOnReturn = false
  14.         maxActive = 10
  15.         maxIdle = 7
  16.         minIdle = 5
  17.         initialSize = 5
  18.         minEvictableIdleTimeMillis = 60000
  19.         timeBetweenEvictionRunsMillis = 60000
  20.         maxWait = 10000
  21.     }
  22. }
  23. dataSource_logs {
  24.     properties {
  25.         validationQuery = 'SELECT 1'
  26.         testOnBorrow = true
  27.         testWhileIdle = true
  28.         testOnReturn = false
  29.         maxActive = 10
  30.         maxIdle = 7
  31.         minIdle = 5
  32.         initialSize = 5
  33.         minEvictableIdleTimeMillis = 60000
  34.         timeBetweenEvictionRunsMillis = 60000
  35.         maxWait = 10000
  36.     }
  37. }
  38.  
  39. hibernate {
  40.     cache.use_second_level_cache = true
  41.     cache.use_query_cache = false
  42.     //    cache.region.factory_class = 'org.hibernate.cache.SingletonEhCacheRegionFactory' // Hibernate 3
  43.     cache.region.factory_class = 'org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory' // Hibernate 4
  44.     singleSession = true // configure OSIV singleSession mode
  45.     flush.mode = 'manual' // OSIV session flush mode outside of transactional context
  46.     //Unicode support mysql https://mathiasbynens.be/notes/mysql-utf8mb4
  47.     connection.charSet = 'utf8mb4'
  48.     connection.characterEncoding = 'utf8mb4'
  49.     connection.useUnicode = true
  50. }
  51. // environment specific settings
  52. environments {
  53.     development {
  54.         dataSource {
  55.             // pooled = true
  56.             //dbCreate = 'validate'
  57.             url = 'jdbc:mysql://ammg-teste.ctd3u1ljvt9q.us-east-1.rds.amazonaws.com/ammg_test'
  58.             username = 'appteste'
  59.             password = 'teste-123'
  60.             properties {
  61.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  62.                 jmxEnabled = true
  63.                 initialSize = 5
  64.                 maxActive = 500
  65.                 minIdle = 5
  66.                 maxIdle = 25
  67.                 maxWait = 10000
  68.                 maxAge = 10 * 60000
  69.                 timeBetweenEvictionRunsMillis = 5000
  70.                 minEvictableIdleTimeMillis = 60000
  71.                 validationQuery = "SELECT 1"
  72.                 validationQueryTimeout = 3
  73.                 validationInterval = 15000
  74.                 testOnBorrow = true
  75.                 testWhileIdle = true
  76.                 testOnReturn = false
  77.                 jdbcInterceptors = "ConnectionState"
  78.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  79.             }
  80.         }
  81.         dataSource_logs {
  82.             username = 'appteste'
  83.             password = 'teste-123'
  84.             //dbCreate = "update"
  85.             pooled = true
  86.             //jmxExport = true
  87.             driverClassName = 'com.mysql.jdbc.Driver'
  88.             dialect = br.com.eteg.mysqldialect.MySQLInnoDBExtendedDialect.class
  89.             url = 'jdbc:mysql://ammg-teste.ctd3u1ljvt9q.us-east-1.rds.amazonaws.com/ammg_test'
  90.             logSql = true
  91.             properties {
  92.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  93.                 jmxEnabled = true
  94.                 initialSize = 5
  95.                 maxActive = 50
  96.                 minIdle = 5
  97.                 maxIdle = 25
  98.                 maxWait = 10000
  99.                 maxAge = 10 * 60000
  100.                 timeBetweenEvictionRunsMillis = 5000
  101.                 minEvictableIdleTimeMillis = 60000
  102.                 validationQuery = "SELECT 1"
  103.                 validationQueryTimeout = 3
  104.                 validationInterval = 15000
  105.                 testOnBorrow = true
  106.                 testWhileIdle = true
  107.                 testOnReturn = false
  108.                 jdbcInterceptors = "ConnectionState"
  109.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  110.             }
  111.         }
  112.     }
  113.  
  114.     test {
  115.         dataSource {
  116.             // pooled = true
  117.             //dbCreate = 'validate'
  118.             url = 'jdbc:mysql://ammg-teste.ctd3u1ljvt9q.us-east-1.rds.amazonaws.com/ammg_test'
  119.             username = 'appteste'
  120.             password = 'teste-123'
  121.             properties {
  122.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  123.                 jmxEnabled = true
  124.                 initialSize = 5
  125.                 maxActive = 500
  126.                 minIdle = 5
  127.                 maxIdle = 25
  128.                 maxWait = 10000
  129.                 maxAge = 10 * 60000
  130.                 timeBetweenEvictionRunsMillis = 5000
  131.                 minEvictableIdleTimeMillis = 60000
  132.                 validationQuery = "SELECT 1"
  133.                 validationQueryTimeout = 3
  134.                 validationInterval = 15000
  135.                 testOnBorrow = true
  136.                 testWhileIdle = true
  137.                 testOnReturn = false
  138.                 jdbcInterceptors = "ConnectionState"
  139.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  140.             }
  141.         }
  142.         dataSource_logs {
  143.             username = 'appteste'
  144.             password = 'teste-123'
  145.             //dbCreate = "update"
  146.             pooled = true
  147.             //jmxExport = true
  148.             driverClassName = 'com.mysql.jdbc.Driver'
  149.             dialect = br.com.eteg.mysqldialect.MySQLInnoDBExtendedDialect.class
  150.             url = 'jdbc:mysql://ammg-teste.ctd3u1ljvt9q.us-east-1.rds.amazonaws.com/ammg_test'
  151.             logSql = true
  152.             properties {
  153.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  154.                 jmxEnabled = true
  155.                 initialSize = 5
  156.                 maxActive = 50
  157.                 minIdle = 5
  158.                 maxIdle = 25
  159.                 maxWait = 10000
  160.                 maxAge = 10 * 60000
  161.                 timeBetweenEvictionRunsMillis = 5000
  162.                 minEvictableIdleTimeMillis = 60000
  163.                 validationQuery = "SELECT 1"
  164.                 validationQueryTimeout = 3
  165.                 validationInterval = 15000
  166.                 testOnBorrow = true
  167.                 testWhileIdle = true
  168.                 testOnReturn = false
  169.                 jdbcInterceptors = "ConnectionState"
  170.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  171.             }
  172.         }
  173.     }
  174.  
  175.     production {
  176.         dataSource {
  177.             // pooled = true
  178.             //dbCreate = 'validate'
  179.             url = ''
  180.             username = ''
  181.             password = ''
  182.             properties {
  183.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  184.                 jmxEnabled = true
  185.                 initialSize = 5
  186.                 maxActive = 500
  187.                 minIdle = 5
  188.                 maxIdle = 25
  189.                 maxWait = 10000
  190.                 maxAge = 10 * 60000
  191.                 timeBetweenEvictionRunsMillis = 5000
  192.                 minEvictableIdleTimeMillis = 60000
  193.                 validationQuery = "SELECT 1"
  194.                 validationQueryTimeout = 3
  195.                 validationInterval = 15000
  196.                 testOnBorrow = true
  197.                 testWhileIdle = true
  198.                 testOnReturn = false
  199.                 jdbcInterceptors = "ConnectionState"
  200.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  201.             }
  202.         }
  203.         dataSource_logs {
  204.             username = ''
  205.             password = ''
  206.             pooled = true
  207.             driverClassName = 'com.mysql.jdbc.Driver'
  208.             dialect = br.com.eteg.mysqldialect.MySQLInnoDBExtendedDialect.class
  209.             url = ''
  210.             properties {
  211.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  212.                 jmxEnabled = true
  213.                 initialSize = 5
  214.                 maxActive = 50
  215.                 minIdle = 5
  216.                 maxIdle = 25
  217.                 maxWait = 10000
  218.                 maxAge = 10 * 60000
  219.                 timeBetweenEvictionRunsMillis = 5000
  220.                 minEvictableIdleTimeMillis = 60000
  221.                 validationQuery = "SELECT 1"
  222.                 validationQueryTimeout = 3
  223.                 validationInterval = 15000
  224.                 testOnBorrow = true
  225.                 testWhileIdle = true
  226.                 testOnReturn = false
  227.                 jdbcInterceptors = "ConnectionState"
  228.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  229.             }
  230.         }
  231.     }
  232.  
  233.     nightly {
  234.         dataSource {
  235.             // pooled = true
  236.             //dbCreate = 'validate'
  237.             url = 'jdbc:mysql://sgbd-teste.sede.eteg.net/ammg_test'
  238.             username = 'eteg'
  239.             password = 'teste-123'
  240.         }
  241.         dataSource_logs {
  242.             username = 'eteg'
  243.             password = 'teste-123'
  244.             //dbCreate = "update"
  245.             pooled = true
  246.             //jmxExport = true
  247.             driverClassName = 'com.mysql.jdbc.Driver'
  248.             dialect = br.com.eteg.mysqldialect.MySQLInnoDBExtendedDialect.class
  249.             url = 'jdbc:mysql://sgbd-teste.sede.eteg.net/ammg_test'
  250.             //logSql = true
  251.         }
  252.     }
  253.  
  254. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement