Let me quote your problem description back at you, with subtle modifications
1. I have a connection pool that will java.lang.Object.notify() when a free connection is available. Concurrent requests wait in the wait set for this notification if the pool does not have sufficient connections.
2. Requests java.lang.Object.wait(timeout) only for a limited period of time. While waiting for the connection, some of the requests may timeout if they do not receive a free connection in the given time.
Hope this helps. If this is too cryptic, please accept my apologies; just ask and I'll try to help.
- Peter