Yes, it depends on the "wait-timeout-in-seconds" pool settings. Default being 60 seconds.
So, if a request could not get a connection, its put in wait-queue so that any client that may return the connection will be made available for the waiting request(s). Once the wait-timeout for the requesting client expires, the request will timeout with the reported exception.
[Message sent by forum member 'jr158900']
http://forums.java.net/jive/thread.jspa?messageID=486213