Advertisement
Guest User

Untitled

a guest
Sep 11th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 9.93 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 = ''
  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.             url = 'jdbc:mysql://localhost:3306/ammg_dev?useSSL=false'
  59.             username = 'root'
  60.             // password = ''
  61.             properties {
  62.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  63.                 jmxEnabled = true
  64.                 initialSize = 5
  65.                 maxActive = 500
  66.                 minIdle = 5
  67.                 maxIdle = 25
  68.                 maxWait = 10000
  69.                 maxAge = 10 * 60000
  70.                 timeBetweenEvictionRunsMillis = 5000
  71.                 minEvictableIdleTimeMillis = 60000
  72.                 validationQuery = "SELECT 1"
  73.                 validationQueryTimeout = 3
  74.                 validationInterval = 15000
  75.                 testOnBorrow = true
  76.                 testWhileIdle = true
  77.                 testOnReturn = false
  78.                 jdbcInterceptors = "ConnectionState"
  79.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  80.             }
  81.         }
  82.         dataSource_logs {
  83.             dbCreate = "none"
  84.             pooled = true
  85.             //jmxExport = true
  86.             driverClassName = 'com.mysql.jdbc.Driver'
  87.             dialect = br.com.eteg.mysqldialect.MySQLInnoDBExtendedDialect.class
  88.             username = 'root'
  89.             // password = ''
  90.             url = 'jdbc:mysql://localhost:3306/ammg_dev?useSSL=false'
  91.             logSql = true
  92.         }
  93.         // dataSource_logs {
  94.         //     username = 'appteste'
  95.         //     password = 'teste-123'
  96.         //     //dbCreate = "update"
  97.         //     pooled = true
  98.         //     //jmxExport = true
  99.         //     driverClassName = 'com.mysql.jdbc.Driver'
  100.         //     dialect = br.com.eteg.mysqldialect.MySQLInnoDBExtendedDialect.class
  101.         //     url = 'jdbc:mysql://ammg-teste.ctd3u1ljvt9q.us-east-1.rds.amazonaws.com/ammg_test'
  102.         //     logSql = true
  103.         //     properties {
  104.         //         // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  105.         //         jmxEnabled = true
  106.         //         initialSize = 5
  107.         //         maxActive = 50
  108.         //         minIdle = 5
  109.         //         maxIdle = 25
  110.         //         maxWait = 10000
  111.         //         maxAge = 10 * 60000
  112.         //         timeBetweenEvictionRunsMillis = 5000
  113.         //         minEvictableIdleTimeMillis = 60000
  114.         //         validationQuery = "SELECT 1"
  115.         //         validationQueryTimeout = 3
  116.         //         validationInterval = 15000
  117.         //         testOnBorrow = true
  118.         //         testWhileIdle = true
  119.         //         testOnReturn = false
  120.         //         jdbcInterceptors = "ConnectionState"
  121.         //         defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  122.         //     }
  123.         // }
  124.     }
  125.  
  126.     test {
  127.         dataSource {
  128.             // pooled = true
  129.             //dbCreate = 'validate'
  130.             url = 'jdbc:mysql://ammg-teste.ctd3u1ljvt9q.us-east-1.rds.amazonaws.com/ammg_test'
  131.             username = 'appteste'
  132.             password = 'teste-123'
  133.             properties {
  134.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  135.                 jmxEnabled = true
  136.                 initialSize = 5
  137.                 maxActive = 500
  138.                 minIdle = 5
  139.                 maxIdle = 25
  140.                 maxWait = 10000
  141.                 maxAge = 10 * 60000
  142.                 timeBetweenEvictionRunsMillis = 5000
  143.                 minEvictableIdleTimeMillis = 60000
  144.                 validationQuery = "SELECT 1"
  145.                 validationQueryTimeout = 3
  146.                 validationInterval = 15000
  147.                 testOnBorrow = true
  148.                 testWhileIdle = true
  149.                 testOnReturn = false
  150.                 jdbcInterceptors = "ConnectionState"
  151.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  152.             }
  153.         }
  154.         dataSource_logs {
  155.             username = 'appteste'
  156.             password = 'teste-123'
  157.             //dbCreate = "update"
  158.             pooled = true
  159.             //jmxExport = true
  160.             driverClassName = 'com.mysql.jdbc.Driver'
  161.             dialect = br.com.eteg.mysqldialect.MySQLInnoDBExtendedDialect.class
  162.             url = 'jdbc:mysql://ammg-teste.ctd3u1ljvt9q.us-east-1.rds.amazonaws.com/ammg_test'
  163.             logSql = true
  164.             properties {
  165.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  166.                 jmxEnabled = true
  167.                 initialSize = 5
  168.                 maxActive = 50
  169.                 minIdle = 5
  170.                 maxIdle = 25
  171.                 maxWait = 10000
  172.                 maxAge = 10 * 60000
  173.                 timeBetweenEvictionRunsMillis = 5000
  174.                 minEvictableIdleTimeMillis = 60000
  175.                 validationQuery = "SELECT 1"
  176.                 validationQueryTimeout = 3
  177.                 validationInterval = 15000
  178.                 testOnBorrow = true
  179.                 testWhileIdle = true
  180.                 testOnReturn = false
  181.                 jdbcInterceptors = "ConnectionState"
  182.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  183.             }
  184.         }
  185.     }
  186.  
  187.     production {
  188.         dataSource {
  189.             // pooled = true
  190.             //dbCreate = 'validate'
  191.             url = ''
  192.             username = ''
  193.             password = ''
  194.             properties {
  195.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  196.                 jmxEnabled = true
  197.                 initialSize = 5
  198.                 maxActive = 500
  199.                 minIdle = 5
  200.                 maxIdle = 25
  201.                 maxWait = 10000
  202.                 maxAge = 10 * 60000
  203.                 timeBetweenEvictionRunsMillis = 5000
  204.                 minEvictableIdleTimeMillis = 60000
  205.                 validationQuery = "SELECT 1"
  206.                 validationQueryTimeout = 3
  207.                 validationInterval = 15000
  208.                 testOnBorrow = true
  209.                 testWhileIdle = true
  210.                 testOnReturn = false
  211.                 jdbcInterceptors = "ConnectionState"
  212.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  213.             }
  214.         }
  215.         dataSource_logs {
  216.             username = ''
  217.             password = ''
  218.             pooled = true
  219.             driverClassName = 'com.mysql.jdbc.Driver'
  220.             dialect = br.com.eteg.mysqldialect.MySQLInnoDBExtendedDialect.class
  221.             url = ''
  222.             properties {
  223.                 // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
  224.                 jmxEnabled = true
  225.                 initialSize = 5
  226.                 maxActive = 50
  227.                 minIdle = 5
  228.                 maxIdle = 25
  229.                 maxWait = 10000
  230.                 maxAge = 10 * 60000
  231.                 timeBetweenEvictionRunsMillis = 5000
  232.                 minEvictableIdleTimeMillis = 60000
  233.                 validationQuery = "SELECT 1"
  234.                 validationQueryTimeout = 3
  235.                 validationInterval = 15000
  236.                 testOnBorrow = true
  237.                 testWhileIdle = true
  238.                 testOnReturn = false
  239.                 jdbcInterceptors = "ConnectionState"
  240.                 defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  241.             }
  242.         }
  243.     }
  244.  
  245.     nightly {
  246.         dataSource {
  247.             // pooled = true
  248.             //dbCreate = 'validate'
  249.             url = 'jdbc:mysql://sgbd-teste.sede.eteg.net/ammg_test'
  250.             username = 'eteg'
  251.             password = 'teste-123'
  252.         }
  253.         dataSource_logs {
  254.             username = 'eteg'
  255.             password = 'teste-123'
  256.             //dbCreate = "update"
  257.             pooled = true
  258.             //jmxExport = true
  259.             driverClassName = 'com.mysql.jdbc.Driver'
  260.             dialect = br.com.eteg.mysqldialect.MySQLInnoDBExtendedDialect.class
  261.             url = 'jdbc:mysql://sgbd-teste.sede.eteg.net/ammg_test'
  262.             //logSql = true
  263.         }
  264.     }
  265.  
  266. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement