context.close is correct. 542 may have other reason/s!

pull/539/head
Nitin 9 years ago
parent b525e0f7ef
commit 85e41abf10

@ -857,7 +857,7 @@ public class HikariConfig implements HikariConfigMXBean
if (maxPoolSize < 0) {
if (minIdle < 0) {
minIdle = 10;
minIdle = 10;
}
maxPoolSize = minIdle;
}

@ -85,9 +85,9 @@ public class HikariJNDIFactory implements ObjectFactory
DataSource jndiDS = (DataSource) context.lookup(jndiName);
if (jndiDS == null) {
Context initContext = new InitialContext();
jndiDS = (DataSource) initContext.lookup(jndiName);
//context.close(); // questionable
final Context ic = new InitialContext();
jndiDS = (DataSource) ic.lookup(jndiName);
ic.close();
}
if (jndiDS != null) {

Loading…
Cancel
Save