public void close() {
   try {
     connPool.close();
   } catch (Exception e) {
     xAuthLog.severe("Failed to close " + getDBMS() + " connection pool!", e);
   }
 }
 @Override
 public void close() {
   if (!isClosed()) {
     connectionPool.close();
     serverMonitor.close();
     isClosed = true;
   }
 }
  private void disposeConnection() {

    currentLocalJID = null;

    boolean acquired = false;

    try {
      acquired = connectLock.tryLock(5000, TimeUnit.MILLISECONDS);
    } catch (InterruptedException e) {
      acquired = false;
    }

    try {
      for (ITransport transport : availableTransports) transport.uninitialize();
    } finally {
      if (acquired) connectLock.unlock();
    }

    connectionPool.close();
    connection = null;
  }