title: Spring Boot: Apparent connection leak detected on long running stored procedure
body: <p>There is a method which calls a stored procedure.The procedure can run for long hours depending on input. After the completion of procedure, there is an update statement. HikariCP-Connection leak is detected at the method which calls procedure and procedure fails sometimes. Please mention on any particular properties to be changed for HikariCP(currently using default properties) or any changes to be made in the code to solve this issue.</p>
  <pre><code>public void procedure (String[] names){
  try(Connection connection = getJdbcTemplate().getDataSource().get connection()){
  Oracle connection oracleConnection = connection.unwrap(OracleConnection.class);
  AbstractSqlTypeValue names = new OracleArrayType(oracle connection,names);
  .... //execute procedure
  ....// update status
  }catch block
  }
  </code></pre>
  <p>2020-08-20 14:01:24.880  WARN 14366 --- [l-1 housekeeper] com.zaxxer.hikari.pool.ProxyLeakTask     : Connection leak detection triggered for oracle.jdbc.driver.T4CConnection on thread , stack trace follows</p>
  <p>java.lang.Exception: Apparent connection leak detected
  at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128) ~[HikariCP-2.7.9.jar:na]
  at service.Procedure.execute(Procedure.java:58) ~[classes/:na]
  at service.Procedure.Procedure(Procedure.java:46) ~[classes/:na]
  at service.Procedure$$FastClassBySpringCGLIB$$f.invoke() ~[classes/:na]
  at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.10.RELEASE.jar:5.0.10.RELEASE]
  at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) ~[spring-aop-5.0.10.RELEASE.jar:5.0.10.RELEASE]
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.0.10.RELEASE.jar:5.0.10.RELEASE]
  at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.10.RELEASE.jar:5.0.10.RELEASE]
  at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.10.RELEASE.jar:5.0.10.RELEASE]
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.10.RELEASE.jar:5.0.10.RELEASE]
  at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.0.10.RELEASE.jar:5.0.10.RELEASE]
  at service.ProcedureService$$EnhancerBySpringCGLIB$$8.Procedure() ~[classes/:na]
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
  at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]</p>