Hi all, I'm using the common-pools and was wondering how most people handle failure to borrow from a pool. Ie ObjectPool.borrowObject() doesn't declare any checked Exception, so how are clients meant to be notified that a pooled Object cannot be supplied?
Should the implementation throw an unchecked Exception? This doesn't seem right as unchecked Exceptions are normally reserved for misuse of an API by a client. But in this case the client has no means of determining whether the pool can supply an Object. But assuming this is the std means of notification, what's the common implementation. 1) Create a class of unchecked Exception which is thrown when the pool cannot supply an object or 2) Have the client catch all RuntimeExceptions and assume that is what this failure represents William Ferguson -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
