Code showcasing a thread-safe connection pool in java.