Advertisement
Guest User

DataSource.groovy

a guest
May 17th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.88 KB | None | 0 0
  1. dataSource {
  2.     pooled = true
  3.     dbCreate = "update"
  4.     url = "jdbc:mysql://localhost:3306/my_database"
  5.     driverClassName = "com.mysql.jdbc.Driver"
  6.     dialect = org.hibernate.dialect.MySQL5InnoDBDialect
  7.     username = "username"
  8.     password = "password"
  9.     properties {
  10.        jmxEnabled = true
  11.        initialSize = 5
  12.        maxActive = 50
  13.        minIdle = 5
  14.        maxIdle = 25
  15.        maxWait = 10000
  16.        maxAge = 10 * 60000
  17.        timeBetweenEvictionRunsMillis = 5000
  18.        minEvictableIdleTimeMillis = 60000
  19.        validationQuery = "SELECT 1"
  20.        validationQueryTimeout = 3
  21.        validationInterval = 15000
  22.        testOnBorrow = true
  23.        testWhileIdle = true
  24.        testOnReturn = false
  25.        jdbcInterceptors = "ConnectionState;StatementCache(max=200)"
  26.        defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement