Hikari config
config.setDriverClassName(DriverClassName);
config.setJdbcUrl(URL);
config.setUsername(username);
config.setPassword(password);
config.addDataSourceProperty("cachePrepStmts", "true");
config.addDataSourceProperty("prepStmtCacheSize", "250");
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
config.setPoolName("insurance");
config.setRegisterMbeans(true);
config.setConnectionTimeout(10000);
config.setMaxLifetime(100000);
config.setIdleTimeout(70000);
Coding
con = HikariCPConnectionInsur.getConnection();
stmt = con.prepareStatement(Qry);
rs = stmt.executeQuery();
After each transaction connection closed properly.
finally {
DbUtils.closeQuietly(rs);
DbUtils.closeQuietly(stmt);
DbUtils.closeQuietly(con);
}
At one item I am using only one active connection. But no of connections increasing. What is the reason ?
Systemname No of connections
visvaedp47 |
JDBC Thin Client |
144 |
arunkumar |
JDBC Thin Client |
52 |
Any inputs will be appreciated .