You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Chuck Williams <ch...@manawiz.com> on 2006/01/31 00:56:52 UTC

[Axis2] ThreadPool create only daemon threads

Hi All,

We are using the TCPServer to listen for incoming connections and
receive messages.  One problem is that this cannot be the only thread
running because it listens in a daemon thread.  In looking through the
code, it is hardwired into the ThreadPool constructor that it only
creates daemon threads.  If only daemon threads are running, of course
the jvm halts.

Is this by design?  It seems to me that ThreadPool should take a
parameter to generate either a daemon or non-daemon thread and that
Axis2's servers should by default create non-daemon threads for the
principal listening activity.

Not sure if this is a bug or a design decision.  We have worked around
it by creating a non-daemon thread that just sleeps.

Thanks for any info.

Chuck