title: Is "jmsListenerContainerFactory" the default factory used by SimpleJmsListenerEndpoint
body: <p>I am working with Spring JMS 4.1 to register messages listeners</p>
  
  <p>In my xml configuration file, I have defined a bean named "jmsListenerContainerFactory":</p>
  
  <pre><code>&lt;bean id="jmsListenerContainerFactory"
            class="org.springframework.jms.config.DefaultJmsListenerContainerFactory"...p:concurrency="3-5".../&gt;
  </code></pre>
  
  <ul>
  <li><p>First question : with Spring 4.x version, isn't it better to declare this factory this way : <code>&lt;jms:listener-container ... /&gt;</code></p></li>
  <li><p>Second and main question : as stated in official doc (24.6.1) : by default, the infrastructure looks for a bean named jmsListenerContainerFactory as the source for the factory to use to create message listener containers. Is it also the case when programmatically registering endpoints this way:</p></li>
  </ul>
  
  <p>.</p>
  
  <pre><code>SimpleJmsListenerEndpoint endpoint = new SimpleJmsListenerEndpoint();
  endpoint.setDestination("...");
  endpoint.setMessageListener(message -&gt; {...});
  registrar.registerEndpoint(endpoint);
  </code></pre>
  
  <p>or do we have to set it explicitly this way for example : <code>registrar.setContainerFactoryBeanName("jmsListenerContainerFactory");</code></p>
  
  <p>Thanks</p>