The figure below shows the logic to borrow a connection from the pool.

BorrowConnection.png