title: Spring JMS: each DefaultMessageListenerContainer deployment takes longer than one before
body: <p>We're using Active MQ 5.6.0, and have configured a number of JMS message listeners (17 currently), each using a Spring 3.1.1 DefaultMessageListenerContainer, deploying to a Jetty 7.</p>
  
  <p>First of all, message routing and handling works and performs fine. The problem is the time it takes to <strong>deploy</strong> the Spring configuration: each deployment takes longer than the one before it, so we're talking something like polynomial rather than linear time. That's going to be crippling if we ever get to 30 or so.</p>
  
  <p>The example (trimmed) log file shows the 17 deployments appearing to fight one another for connection, until - after over 2.5 minutes - all are connected:</p>
  
  <pre><code>22:33:21,147 - (Def...r) - JMS message listener invoker needs to establish shared Connection
  22:33:22,148 - (Def...r) - JMS message listener invoker needs to establish shared Connection
  22:33:23,160 - (Def...r) - JMS message listener invoker needs to establish shared Connection
  22:33:23,166 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerA' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:33:24,160 - (Def...r) - JMS message listener invoker needs to establish shared Connection
  22:33:24,172 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerB' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:33:25,173 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerC' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:33:26,184 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerD' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:33:27,166 - (Def...r) - JMS message listener invoker needs to establish shared Connection
  [*snip*]
  22:35:25,135 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerI' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:26,146 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerH' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:27,167 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerD' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:28,178 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerE' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:29,179 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerF' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:31,191 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerG' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:32,192 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerH' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:33,203 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerI' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:34,214 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerJ' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:35,225 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerK' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:36,229 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerL' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:37,230 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerM' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:38,242 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerN' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:40,266 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerC' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:41,277 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerB' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:42,280 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerA' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:44,292 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerN' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:45,293 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerM' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:46,294 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerL' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:47,300 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerK' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:48,282 - (Def...r) - JMS message listener invoker needs to establish shared Connection
  22:35:48,311 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerJ' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:49,322 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerI' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:50,322 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerH' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:51,323 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerG' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:53,345 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerF' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:54,366 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerE' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:55,367 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerD' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:56,378 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerH' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:57,389 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerI' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:58,394 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerJ' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:35:59,400 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerK' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:00,396 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerL' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:01,409 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerM' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:02,412 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerN' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:03,421 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerO' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:04,422 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerA' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:05,426 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerB' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:06,437 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerC' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:09,471 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerO' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:10,472 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerN' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:11,483 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerM' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:12,483 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerL' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:13,459 - (Def...r) - JMS message listener invoker needs to establish shared Connection
  22:36:13,494 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerK' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:14,515 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerJ' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:15,516 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerI' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:16,518 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerH' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:17,530 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerD' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:18,541 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerE' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:19,542 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerF' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:21,546 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerG' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:22,557 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerH' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:23,569 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerI' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:24,580 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerJ' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:25,581 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerK' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:26,582 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerL' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:27,593 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerM' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:28,594 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerN' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:29,605 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerO' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:30,616 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerP' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:32,638 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerC' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:33,639 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerB' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:34,650 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerA' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:36,674 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerP' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:37,685 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerO' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:38,805 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerN' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:39,806 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerM' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:40,653 - (Def...r) - JMS message listener invoker needs to establish shared Connection
  22:36:40,807 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerL' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:41,824 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerK' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:42,825 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerJ' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:43,837 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerI' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:44,838 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerH' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:45,851 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerG' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:47,863 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerF' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:48,874 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerE' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:49,875 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerD' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:50,876 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerH' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:51,891 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerI' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:52,902 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerJ' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:53,913 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerK' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:54,924 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerL' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:55,925 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerM' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:56,926 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerN' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:57,937 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerO' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:58,935 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerP' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:36:59,936 - (Def...r) - Could not refresh JMS Connection for destination 'queue://HandlerQ' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://0.0.0.0:61616. Reason: java.net.ConnectException: Connection refused: connect
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  22:37:00,520 - (Def...r) - Successfully refreshed JMS Connection
  </code></pre>
  
  <p>For the sake of brevity, I won't post each Spring bean, but here are the important bits:</p>
  
  <pre><code>&lt;jee:jndi-lookup id="srcConnectionFactory" jndi-name="${jndi.jms.connfactory}"&gt;
      &lt;jee:environment&gt;
          java.naming.factory.initial = ${jndi.jms.naming.factory.initial}
          java.naming.provider.url = ${jndi.jms.naming.url}
      &lt;/jee:environment&gt;
  &lt;/jee:jndi-lookup&gt;
  
  &lt;bean id="connectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory"&gt;
      &lt;property name="targetConnectionFactory" ref="srcConnectionFactory"/&gt;
      &lt;property name="cacheConsumers" value="false"/&gt;
      &lt;property name="reconnectOnException" value="true"/&gt;
      &lt;property name="sessionCacheSize" value="20"&gt;&lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;jee:jndi-lookup id="handlerA_Dest" jndi-name="handlerA"&gt;
      &lt;jee:environment&gt;
          java.naming.factory.initial = ${jndi.jms.naming.factory.initial}
          java.naming.provider.url = ${jndi.jms.naming.url}
          queue.handlerA = handlerA
      &lt;/jee:environment&gt;
  &lt;/jee:jndi-lookup&gt;
  
      [x 17]
  
  &lt;bean id="handlerA_Container" class="org.springframework.jms.listener.DefaultMessageListenerContainer"
      p:connectionFactory-ref="connectionFactory"
      p:messageListener-ref="handlerA"
      p:destination-ref="handlerA_Dest"&gt;
      &lt;property name="concurrentConsumers"&gt;&lt;value&gt;10&lt;/value&gt;&lt;/property&gt;
      &lt;property name="maxConcurrentConsumers"&gt;&lt;value&gt;10&lt;/value&gt;&lt;/property&gt;
      &lt;property name="idleConsumerLimit"&gt;&lt;value&gt;5&lt;/value&gt;&lt;/property&gt;
  &lt;/bean&gt;     
  
      [x 17]
  </code></pre>
  
  <p>Any idea why these containers should be contending at all?</p>
  
  <p>Unfortunately, the <code>MessageSelector</code> approach is not (any longer) an option for us. It's one Listener per type-of-Message.</p>
  
  <hr>
  
  <p><strong>Update</strong> It's true that, strictly speaking, the MQ broker is indeed down at the start of this deployment, but it's deployed into the same Jetty (this all happens in the Maven integration test phase), so even if there was a brief period where the broker started up second, I wouldn't expect it to be 2-3 minutes late.</p>
  
  <p>What I'm seeing looks really looks like the broker deployment is being 'blocked' by this Spring deployment...</p>