public synchronized Connection get() throws DataException {
    // ensure we haven't used too many connections
    if (usedConnections.size() >= MAX_CONNECTIONS) {
      throw new DataException("The database connection pool is out of connections -- a maximum number of " + MAX_CONNECTIONS);
    }//if
    
    try {
      // do we have enough connections to assign one out?
      if (freeConnections.size() == 0) {
        freeConnections.add(createConnection());
      }

      // return the first free connection
      Connection conn = freeConnections.remove(0);
      usedConnections.add(conn);
      //Logger.global.info("Gave out a connection from the pool.  Free size is now: " + freeConnections.size() + "/" + (freeConnections.size() + usedConnections.size()));
      return conn; 
    }catch (Exception e) {
      throw new DataException("An error occurred while retrieving a database connection from the pool", e);
    }
  }//get