Found the problem. If the ServerSocket soTimeout is not set then the serverSocket.accept() will not return until the next accepted socket. In this case, when stop is called, it will wait until the run returns in the TcpTransportServer. If the soTimeout is not set, it wont stop!
I extend the TcpTransportServer in order to implement my own socket negotiation process. I had removed the soTimeout setting:( -- View this message in context: http://www.nabble.com/Shutdown-hangs-tf1934649.html#a5431195 Sent from the ActiveMQ - User forum at Nabble.com.
