Building a JDBC Connection Pool with Java Concurrency Primitives
A lightweight, in-memory connection pool can be implemented with nothing more than java.sql.Connection stubs, a LinkedList, and the classic wait/notify mechanism. Below you’ll find a complete walk-through that covers stub generation, pool logic, timeout handdling, and a stress-test harness. Stubbing...