Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. @Cacheable("dateCache")
  2. public Date getSystemTime()
  3. {
  4. String query = "SELECT f_sys_date FROM DUAL";
  5. return (Date)
  6. this.entityManager.createNativeQuery(query).getSingleResult();
  7. }
  8.  
  9. JedisPoolConfig poolConfig = new JedisPoolConfig();
  10. poolConfig.setMaxTotal(300);
  11. poolConfig.setMaxIdle(50);
  12. poolConfig.setMinIdle(10);
  13. poolConfig.setMaxWaitMillis(6000);
  14. poolConfig.setTestOnBorrow(false);
  15. poolConfig.setTestOnCreate(false);
  16. poolConfig.setTestWhileIdle(false);
  17. poolConfig.setTestOnReturn(false);
  18. poolConfig.setMinEvictableIdleTimeMillis(60000);
  19. poolConfig.setTimeBetweenEvictionRunsMillis(30000);
  20. poolConfig.setNumTestsPerEvictionRun(-1);
  21. poolConfig.setFairness(true);
  22. connectionFactory.setPoolConfig(poolConfig);
  23. connectionFactory.setUsePool(true);
  24. connectionFactory.afterPropertiesSet();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement