Hi, Thank you for your response. You said SocketConnector should be disposed, I wonder when to dispose it? If my application runs as a service, the SocketConnector is held for a long time.
Regards HeQi On Mon, May 26, 2008 at 9:47 AM, Tuure Laurinolli <[EMAIL PROTECTED]> wrote: > Michael Qi wrote: >> >> Hi, >> >> I write a simple program to test SocketConnector, I start 10 >> connector but when 5 has connected, it hangs. Could you tell me why? > > Your thread pool runs out of threads. > > Each SocketConnector consumes two threads from the pool, and because you use > an unbounded queue, the pool does not grow. SocketConnectors also consume > file descriptors, and need to be disposed properly. Failing to do so causes > fd leakage at least in MINA 2. > >