title: ActiveMQ Transport Thread is not terminated when main ends
body: <p>This is how I start connection:</p>
  
  <pre><code>factory = new PooledConnectionFactory(brokerURL);
  
  brokerURL is "failover:(tcp://host1.com:61616,tcp://host2.com:61616)?randomize=false&amp;jms.useAsyncSend=false&amp;jms.dispatchAsync=false&amp;maxReconnectAttempts=30&amp;maxReconnectDelay=3000"
  </code></pre>
  
  <p>Connection is started:</p>
  
  <pre><code>connection = factory.createConnection("", ""); 
  connection.start();
  </code></pre>
  
  <p>Application performs its usual tasks before connections gets closed:</p>
  
  <pre><code>connection.close();
  </code></pre>
  
  <p>main method is finished, but JVM is not, because there are still a few ActiveMQ threads active:</p>
  
  <pre><code>Thread [ActiveMQ Transport: tcp://host1.com/ip_address:61616@2455] (Running)    
  Daemon Thread [ActiveMQ InactivityMonitor ReadCheckTimer] (Running) 
  Daemon Thread [ActiveMQ InactivityMonitor WriteCheckTimer] (Running)    
  Daemon Thread [ActiveMQ InactivityMonitor Worker] (Running) 
  </code></pre>
  
  <p>How am I supposed to close it so that the threads above will shutdown too.
  ActiveMQ version 5.10.0</p>
  
  <p>thanks in advance</p>