Advertisement
NLinker

HikariCP init

Nov 24th, 2016
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1.         System.out.println("hikariCP initializing...");
  2.  
  3.         HikariConfig config = new HikariConfig();
  4.         config.setJdbcUrl("jdbc:postgresql://xxx.us-west-2.rds.amazonaws.com:5432/" +
  5.             "epf_db?useUnicode=yes&characterEncoding=utf-8");
  6.         config.setUsername("user_ro");
  7.         config.setPassword("XXXXXXPWDXXXXXX");
  8.         config.setInitializationFailFast(true);
  9.         config.setMaximumPoolSize(20);
  10.         config.setConnectionTestQuery("SELECT 1");
  11.         HikariDataSource ds = new HikariDataSource(config);
  12.  
  13.         System.out.println("hikariCP initialized");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement