title: QPID Connection factory properties
body: <p>My system is based on camel and use <a href="https://qpid.apache.org/releases/qpid-jms-0.37.0/docs/index.html" rel="nofollow noreferrer">Apache QPID 0.37.0</a> to consume messages from a remote AMQPS sever. Our system authenticates via a client certificate. Thus I have this piece of configuration:</p>
  
  <pre><code>&lt;bean id="jmsConnectionFactory" class="org.apache.qpid.jms.JmsConnectionFactory"&gt;
      &lt;constructor-arg name="remoteURI" value="amqps://some-location:5671?transport.keyStoreLocation=/very/long/path/nnn-openssl.p12&amp;amp;transport.keyStorePassword=*******&amp;amp;transport.trustStoreLocation=/very/long/path/server.keystore&amp;amp;transport.trustStorePassword=*******"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>This is just working fine. However, configuring key/trust store this way (i.e. in the URI) has several drawbacks:</p>
  
  <ul>
  <li>First, it is not easy to read and maintain.</li>
  <li>Some components log the URI, so the paths (I can live with it) and the passwords (ouch...) get logged.</li>
  </ul>
  
  <p>I know it's possible to configure via a system property (<code>javax.net.ssl.keyStore</code>, and son on), but it's not an option because different modules may use different key and trust store, and we want to keep them in separate files.</p>
  
  <p>Is there a way to configure those transport properties of <strong>JmsConnectionFactory</strong> in a different way ?</p>
  
  <p>Something like:</p>
  
  <pre><code>&lt;bean id="jmsConnectionFactory" class="org.apache.qpid.jms.JmsConnectionFactory"&gt;
      &lt;constructor-arg name="remoteURI" value="amqps://some-location:5671"/&gt;
      &lt;property name="transport.keyStoreLocation" value="/very/long/path/nnn-openssl.p12"/&gt;
      ...
  &lt;/bean&gt;
  </code></pre>
  
  <p>Note that this factory is used in a JMSConfig, which in turn is used within an AMQPComponent:</p>
  
  <pre><code>&lt;bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration" &gt;
      &lt;property name="connectionFactory" ref="jmsConnectionFactory" /&gt;
      ...
  &lt;/bean&gt;
  
  &lt;bean id="amqp" class="org.apache.camel.component.amqp.AMQPComponent"&gt;
      &lt;property name="testConnectionOnStartup" value="true"/&gt;
      &lt;property name="configuration" ref="jmsConfig" /&gt;
      ...
  &lt;/bean&gt;
  </code></pre>