did you try calling "activateOptions" method on the appender?

On Thu, Oct 29, 2009 at 12:07 PM, Mate Gulyas <[email protected]> wrote:

> Dear All!
>
> I encountered a problem I do not really see how to resolve. I want to
> assign
> a unique port for every instance of an object I have, but I am not able to
> assign a port for the SocketAppender I use, because when I set the new
> port,
> it won't reconnect (jsut set the port variable), thus the old port is still
> in used. (In fact, on that port there is no ServerSocket on the other side,
> so it fails to connect at the beggining)
> I tried to write a subclass, so I have a changePortAndReconnect-like
> method,
> but I realized I have no visibility for the connect method in the
> SocketAppender superclass. Any idea how should I implement this, so when I
> have a new instance created, it will use an assigned port, added directly
> form the code?
>
> The other question I have is almost the same, but on the other side. I want
> to write a SocketServerApplication, that can listen to different port's, so
> when I want to listen another port, It will close the current one, and
> reconnect to another. It is possible to use the same instance but on a
> different port, or I have to create a new ServerSocket instance?
>
> Thanks for any assistance inadvance,
>
> Mate Gulyas
> Budapest University of Technology and Economics
> Faculty of Electric Engineering and Informatics
>

Reply via email to