On Tue, 2002-08-27 at 10:18, Kettal, El-Yamine wrote: > Hi, > > I have the following question regarding the class SocketServer.java (used to > allow TCP connection): > > In the function main, when a connection is accepted a thread is created at > the following line: > new Thread(new SocketNode(socket, h)).start(); > > As the reference to this thread is not kept any where in the program then > this thread will be in the list of items to be cleaned by the garbage > collector.
Threads are only GC'ed when not running, i.e., when run() returns. > Thus, when the socket node and the thread are both cleaned by GC then the > TCP appender will have to reconnect again. > > My question is: > Are the log4j TCP server and appender using one socket for several logging > events (until the TCP appender is closed) or is the TCP server creating a > socket node for every one or two logging events (depending on socket status > (deleted or not)).? > > Thanks > El-Yamine Kettal -- []'s Daniel Serodio -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>