commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <>
Subject Re: Is commons Net thread safe?
Date Sat, 03 Jul 2004 18:30:47 GMT

In message <>, "Farooque Khan" writes:
>Thanks. yes I was talking about TelntClient class. But my observation was
>very different. When I took two separate instances of this class in two
>separate threads and launched them at once, they connected properly (to two
>different servers), but the streams were closed immediately when I tried to
>read the data. When I launched each thread separately (no change in code),
>they worked perfectly well. Any hints where the issues lies?

It may not necessarily be an issue with TelnetClient.  I can't think of
anything that would cause that other than the servers closing the connection.
On the other hand, there could be a race condition of some sort.  If you
submit a bug report with sample code reproducing the problem, I'll take
some time out to investigate it over the next week.  The telnet package
is the one part of Commons Net that really needs to be reimplemented with
selectable io now that it is available.  Since it uses threads right now,
there's always a risk of something fishy happening.  If that's the source
of the problem, I'll take the opportunity to think about how to
simultaneously support J2SE 1.4 and 1.2-1.3 from the same code base.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message