title: Setup independent ActiveMQ broker in camel blueprint xml
body: <p>I am setting up a ServieMix instance using apache-camel as the routing engine, with my routes defined in a blueprint.xml. I am trying to configure ActiveMQ for my blueprint to be completely isolated from anything else (use its own, private, broker).</p>
  
  <p>Here is my camel blueprint XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;blueprint 
  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
  xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
  &gt;
  
      &lt;bean id="record_ip" class="my.service.RecordIP"/&gt;
  
      &lt;bean id="jmsConnectionFactory" 
         class="org.apache.activemq.ActiveMQConnectionFactory"&gt;
         &lt;property name="brokerURL" value="vm://myBroker?create=true&amp;amp;waitForStart=10000" /&gt;
         &lt;property name="userName" value="shadow"/&gt;
         &lt;property name="password" value="broker"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id="pooledConnectionFactory" 
         class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start" destroy-method="stop"&gt;
         &lt;property name="maxConnections" value="8" /&gt;
         &lt;property name="connectionFactory" ref="jmsConnectionFactory" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="jmsConfig" 
         class="org.apache.camel.component.jms.JmsConfiguration"&gt;
         &lt;property name="connectionFactory" ref="pooledConnectionFactory"/&gt;
         &lt;property name="concurrentConsumers" value="10"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id="activemq" 
          class="org.apache.activemq.camel.component.ActiveMQComponent"&gt;
          &lt;property name="configuration" ref="jmsConfig"/&gt;
      &lt;/bean&gt;
  
      &lt;camelContext xmlns="http://camel.apache.org/schema/blueprint"&gt;
  
        &lt;route id="tracing_route"&gt;
          &lt;from uri="jetty:http://localhost:9696/trace"/&gt;
          &lt;inOnly uri="activemq:queue:ip_capture"/&gt;
        &lt;/route&gt;
  
        &lt;route id="ip_capture"&gt;
          &lt;from uri="activemq:queue:ip_capture?concurrentConsumers=1&amp;amp;maxConcurrentConsumers=64&amp;amp;maxMessagesPerTask=100"/&gt;
          &lt;bean ref="record_ip"/&gt;
          &lt;log message="Finished!" loggingLevel="WARN" /&gt;
        &lt;/route&gt;
      &lt;/camelContext&gt;
  
  &lt;/blueprint&gt;
  </code></pre>
  
  <p>I don't think it's using the setup at all because I get the following error</p>
  
  <pre><code>Could not refresh JMS Connection for destination 'ip_capture' - retrying in 5000 ms. Cause: Error while attempting to add new Connection to the pool; nested exception is javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Broker named 'amq-broker' does not exist.
  </code></pre>
  
  <p>And amq-broker is the default broker.</p>
  
  <p>I'm pouring through everything I can find but something important is missing</p>
  
  <ul>
  <li><a href="http://camel.apache.org/activemq.html" rel="nofollow noreferrer">http://camel.apache.org/activemq.html</a></li>
  <li><a href="http://activemq.apache.org/networks-of-brokers.html" rel="nofollow noreferrer">http://activemq.apache.org/networks-of-brokers.html</a></li>
  <li><a href="http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html" rel="nofollow noreferrer">http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html</a></li>
  <li><p><a href="http://activemq.apache.org/xml-configuration.html" rel="nofollow noreferrer">http://activemq.apache.org/xml-configuration.html</a></p></li>
  <li><p>I can't use <code>xmlns:amq="http://activemq.apache.org/schema/core"</code> (ServiceMix can't resolve it)</p></li>
  </ul>
  
  <p>I am using </p>
  
  <ul>
  <li>ServiceMix 7.0.0</li>
  <li>apache-camel/camel-blueprint 2.16.4</li>
  <li>activemq-client/camel/blueprint 5.14.3</li>
  </ul>
  
  <p>So long story sort, <strong>How do I properly configure ActiveMQ for my blueprint to be completely isolated from anything else?</strong></p>