Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. OracleDriver dr = new OracleDriver();
  2. Properties prop = new Properties();
  3. prop.setProperty( OracleConnection.CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL,AnoServices.ANO_REQUIRED);
  4. // set more
  5. (OracleConnection)dr.connect(url,prop);
  6.  
  7. myDatasource {
  8. pooled = false
  9. driverClassName = "oracle.jdbc.OracleDriver"
  10. dbCreate = "validate" // one of 'create', 'create-drop', 'update', 'validate', ''
  11. dialect = "org.hibernate.dialect.Oracle10gDialect"
  12. username = username
  13. password = password
  14. url = url
  15. logSql = true
  16. format_sql = true
  17. pooled = true
  18. properties {
  19. maxActive = 8
  20. maxIdle = 4
  21. minIdle = 1
  22. initialSize = 1
  23. minEvictableIdleTimeMillis = 60000
  24. timeBetweenEvictionRunsMillis = 60000
  25. maxWait = 10000
  26. validationQuery = "select 1 from dual"
  27. testOnBorrow=true
  28. testWhileIdle=true
  29. testOnReturn=true
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement