tags:

views:

1329

answers:

3

I need to manage long running TCP socket connections to an external server from my Java application. I'm looking for a good socket pool so I will be able to re-use the sockets. Are there any suggestions?

+2  A: 

You could have a look at building a socket pool on top of Commons Pool.

Mark
Though about it, but I had bad experience with it in the past. Also, its code is was not optimised to Java 5/6 - no Generics, no concurrent collections, etc.
David Rabinowitz
Good point. I guess that is one of the problems with some of the commons projects - collections being another example.
Mark
Went for it after all.
David Rabinowitz
A: 

Koders.com has an implementation here. I can't vouch for it's functionality, however, so you should run a few tests on it.

Brian Agnew
A: 

look at the java.util.concurrency package

Marius
I have. There is a thread pool implementation, which is not helpful very much.
David Rabinowitz