title: What's the difference between ActivationSpec and ConnectionFactory?
body: <p>My understanding is that:</p>
  
  <ul>
  <li>MD<strong>B</strong>s (Message Driven Beans) connect via Activation Specification. </li>
  <li>MD<strong>P</strong>s (Message Driven POJO) connect via Connection Factory. </li>
  </ul>
  
  <p>This diagram <a href="http://www.ibm.com/developerworks/websphere/library/techarticles/0504_barcia/0504_barcia.html" rel="noreferrer">from IBM</a> is helpful:</p>
  
  <p><img src="https://i.stack.imgur.com/KTZiV.gif" alt="enter image description here"></p>
  
  <p>To me, <a href="http://www.ibm.com/developerworks/websphere/library/techarticles/0504_barcia/0504_barcia.html" rel="noreferrer">this explanation from IBM</a> does not shed much light on the difference:</p>
  
  <ul>
  <li><strong>Connection factory</strong> -- used by the application to get connections to the messaging bus.</li>
  <li><strong>Queue</strong> -- used by the application to send and receive messages.</li>
  <li><strong>Activation specification</strong> -- used by the application's message-driven bean to connect to the queue and receive messages.</li>
  </ul>
  
  <p>One real <a href="http://download.oracle.com/javaee/6/tutorial/doc/gipko.html" rel="noreferrer">difference I have found is that</a>:</p>
  
  <blockquote>
    <p>Session beans and entity beans [aka MDPs] allow you to send JMS messages and to
    receive them <strong>synchronously, but not asynchronously</strong>. To avoid tying up
    server resources, you may prefer not to use blocking synchronous
    receives in a server-side component. <strong>To receive messages
    asynchronously, use a message-driven bean</strong> [MDB].</p>
  </blockquote>
  
  <p>So the unsatisfying list I have so far is:</p>
  
  <ul>
  <li>Use ActivationSpec with an MDB and ConnectionFactory with a POJO (but wait, can POJOs <a href="http://blog.xebia.com/2009/09/spring-jms-and-websphere/" rel="noreferrer">use ActivationSpec too</a> ?)</li>
  <li>MDB's operate asynchronously. MBP's operate synchronously.</li>
  </ul>
  
  <p>My question is: Are there other differences? Can you clarify the difference ?</p>
  
  <p>References:</p>
  
  <ul>
  <li><a href="http://www.ibm.com/developerworks/websphere/library/techarticles/0504_barcia/0504_barcia.html" rel="noreferrer">Deploying message-driven beans and JMS applications into the Service Integration Bus</a></li>
  <li><a href="http://www.coderanch.com/t/459573/Spring/Spring-JMS-vs-MDB" rel="noreferrer">Spring JMS vs MDB</a></li>
  </ul>