commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <>
Subject Re: Apache common pooling 2
Date Tue, 03 Feb 2015 23:28:01 GMT
On Tue, Feb 3, 2015 at 5:07 PM, Matthew Huckaby
<> 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:
For additional commands, e-mail:

View raw message