commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Renouf <>
Subject daemon issue
Date Mon, 03 Jan 2005 19:55:01 GMT

Hi all,

I'm trying to write a Java Daemon which will listen for incoming connections and
when it gets certain commands start up various threads or processes.  The
problem that I'm having right now involves the spawned threads creating sockets.

When running via jsvc as a daemon the main listening thread spawns a thread to
handle each connection.  That thread is able to create a new Socket(host, port)
with no problem (just added for testing purposes).  That thread the processes
the command and, in some cases, spawns a new thread that uses the HttpClient
package to retrieve a web page, but that failes with a
connection failed.  If I just try to do the same Socket(host, port) as the
listening thread does that also fails.

Also if I run the whole thing by hand, not as a Daemon everything seems to work
just fine.

Can anyone help point out something that I could be overlooking, because I'm not
sure what else to try as far as tracking this down goes.

This mail sent using ToadMail -- Web based e-mail @ ToadNet

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

View raw message