On Tue, Feb 3, 2015 at 5:07 PM, Matthew Huckaby <[email protected]> wrote: > > JC> Perhaps you'd be more interested in a "cache" rather than a "pool"? > > If the intention is to share an SFTP session/client reference between > threads, check-in and check-out could be important. >
I was assuming that the true intent was to really share the instances between threads. If that's the case, then a cache might be more appropriate. However, as you point out, it's probably not wise to share those connections with SFTP anyway, so pooling really is what you want. You're going to have to do some form of serialization of the messages/requests (whatever they're called) going across that connection. May as well let commons-pool do it for you by borrow/return pattern. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
