title: Running Camel standalone and have it keep running
body: <p>I'm experimenting with Apache Camel for the first time and I am trying to create a standalone application using the example found here: <a href="http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html" rel="nofollow">http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html</a> </p>
  
  <p>This example is using the <code>org.apache.camel.Main</code> class to manage the lifecycle of the application. The example works fine but what I don't understand is how the Camel context is created in the example and how to get hold of it to add components. I would like to add something something like this to the default context:</p>
  
  <pre><code>ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
  context.addComponent("myJms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
  </code></pre>