code: public Connection getConnection()
      {
          Connection connection;
  
          try
          {
              if (getLogger().isDebugEnabled())
              {
                  getLogger().debug("before: active : " + connectionPool.getNumActive() + " idle: " + connectionPool.getNumIdle());
              }
              connection = dataSource.getConnection();
              if (getLogger().isDebugEnabled())
              {
                  getLogger().debug("after: active : " + connectionPool.getNumActive() + " idle: " + connectionPool.getNumIdle() + " giving " + connection);
              }
          }
          catch (Exception e)
          {
              getLogger().error("Unable to get connection " + this, e);
              throw new MithraDatabaseException("could not get connection", e);
          }
          if (connection == null)
          {
              throw new MithraDatabaseException("could not get connection"+this);
          }
          return connection;
      }
docs: gets a connection from the pool. initializePool() must've been called before calling this method.
  If all connections are in use, this method will block, unless maxWait has been set.
  @return a connection.