code: private void closeConnection(Object connectionHandle)
     {
        try
        {
           Throwable exception = null;
  
           synchronized (connectionStackTraces)
           {
              exception = connectionStackTraces.remove(connectionHandle);
           }
  
           Method m = SecurityActions.getMethod(connectionHandle.getClass(), "close", new Class[]{});
  
           try
           {
              if (exception != null)
              {
                 log.closingConnection(connectionHandle, exception);
              }
              else
              {
                 log.closingConnection(connectionHandle);
              }
  
              m.invoke(connectionHandle, new Object[]{});
           }
           catch (Throwable t)
           {
              log.closingConnectionThrowable(t);
           }
        }
        catch (NoSuchMethodException nsme)
        {
           log.closingConnectionNoClose(connectionHandle.getClass().getName());
        }
     }
docs: Close connection handle
  @param connectionHandle Connection handle