title: Binding objects to apache mq jndi provider
body: <p>I have found numerous examples on the internet, in which I can use spring with JNDI to setup apache mq:</p>
  
  <pre><code>&lt;bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"&gt;
      &lt;property name="environment"&gt;
          &lt;props&gt;
              &lt;prop key="java.naming.factory.initial"&gt;org.apache.activemq.jndi.ActiveMQInitialContextFactory&lt;/prop&gt;
              &lt;prop key="java.naming.provider.url"&gt;tcp://localhost:61616&lt;/prop&gt;
              &lt;prop key="java.naming.security.principle"&gt;system&lt;/prop&gt;
              &lt;prop key="java.naming.security.credentials"&gt;credentials&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jndiQueueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"&gt;
      &lt;property name="jndiTemplate" ref="jndiTemplate"/&gt;
      &lt;property name="jndiName" value="ConnectionFactory"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>What I can't find out, is where the objects are being bound to the JNDI provider.  In the above example I don't understand where ConnectionFactory is coming from?  It appears to exist in the context, but is there a configuration file I am supposed to be editing in order to determine which java objects are included / made part of it?</p>