currentConn = (currentConn + 1) % poolSize; return conn[currentConn];
try {  while (freeConnections.isEmpty()) { try { wait(); } catch (InterruptedException e) { System.out.println("Connection pool wait interrupted."); } }  Connection c = (Connection) freeConnections.pop(); return c; } catch (EmptyStackException e) { System.out.println("Out of connections."); return null; }
  public Connection getConnection()  {    currentConn = (currentConn + 1) % poolSize;    return conn[currentConn];  }