activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathos Marcer <>
Subject TcpTransport as a daemon
Date Tue, 16 Sep 2008 04:13:40 GMT

I've been struggling with trying to determine why I couldn't get an
application to exit unless I specifically used a System.exit or killed the
process out right.  While it looks like many of the threaded parts of
activemq have been made to be daemon threads, TcpTransport (i.e.
org.apache.activemq.transport.tcp.TcpTransport) still contains a case where
it explicitly sets it as a non-daemon thread (i.e. setDaemon(false)).  The
case is on line 142, this corresponds to instantiation of TcpTransport with
the following parameters: WireFormat wireFormat, SocketFactory
socketFactory, URI remoteLocation, URI localLocation.  I changed this value
and recompiled and it allows me to close properly.  Is there a reason one
should not do have TcpTransport as a daemon in this instance?  Is this a
patch that could/should be added?

[1] If I explicitly issued a close on the connection, it would have exited;
however, this is part of a log handler I am writing which waits for all
non-daemon threads to finish before issuing a close which in my case closes
the connection.

View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message