Advertisement
Guest User

Untitled

a guest
Sep 27th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. hibernate {
  2. cache {
  3. queries = false
  4. use_second_level_cache = true
  5. use_query_cache = false
  6. region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory'
  7. }
  8. }
  9.  
  10. dataSource {
  11. pooled = true
  12. jmxExport = true
  13. dialect = 'org.hibernate.dialect.PostgreSQLDialect'
  14. driverClassName = 'org.postgresql.Driver'
  15. username = 'postgres'
  16. password = 'postgres'
  17. properties = {
  18. jmxEnabled = true
  19. initialSize = 5
  20. maxActive = 50
  21. minIdle = 5
  22. maxIdle = 25
  23. maxWait = 10000
  24. maxAge = 10 * 60000
  25. timeBetweenEvictionRunsMillis = 5000
  26. minEvictableIdleTimeMillis = 60000
  27. validationQuery = "SELECT 1"
  28. validationQueryTimeout = 3
  29. validationInterval = 15000
  30. testOnBorrow = true
  31. testWhileIdle = true
  32. testOnReturn = false
  33. ignoreExceptionOnPreLoad = true
  34. jdbcInterceptors = "ConnectionState;StatementCache(max=200)"
  35. defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED // safe default
  36. abandonWhenPercentageFull = 100 // settings are active only when pool is full
  37. removeAbandonedTimeout = 120
  38. removeAbandoned = true
  39. logAbandoned = false // causes stacktrace recording overhead, use only for debugging
  40. }
  41. }
  42.  
  43. environments {
  44. development {
  45. dataSource {
  46. dbCreate = 'update'
  47. url = "jdbc:postgresql://localhost:5432/testdb"
  48. logSql = true
  49. }
  50. }
  51. test {
  52. dataSource {
  53. dbCreate = 'update'
  54. url = "jdbc:postgresql://localhost:5432/testdb"
  55. logSql = true
  56. }
  57. }
  58. production {
  59. dataSource {
  60. dbCreate = 'update'
  61. url = "jdbc:postgresql://localhost:5432/testdb"
  62. logSql = true
  63. }
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement