title: How to configure a Spring 3 consumer for activemq 5 over SSL
body: <p>I am trying to create an SSL connection to activemq (using Spring 3.1, ActiveMQ 5.5, and Camel 10.0).  I'm getting the dreaded SSL handshake exception.  I can connect with an openssl s_client using the certificate in the jks.  Thus, I'm trying to figure out if there is a problem with my keystore (which seems to work in other situations - e.g. with tomcat) or a problem with my XML configuration.  Does anyone have a good example, thoughts about other ways to test, or see what I'm doing wrong?  </p>
  
  <p>Please note, my config passes validation (in case you see a typo).</p>
  
  <p>Thanks
  -J</p>
  
  <pre><code>&lt;bean id="myJmsRedeliverPolicy" class="org.apache.activemq.RedeliverPolicy"&gt;
      &lt;property name="maximumRedeliveries" value="500"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jmsSecureConnectionFactory" class="org.apache.activemq.ActiveMQSslConnectionFactory"&gt;
      &lt;property name="brokerURL" value="ssl://test.com:8100"/&gt;
      &lt;property name="redeliverPolicy" ref="myJmsRedeliverPolicy"/&gt;
      &lt;property name="keyStore" value="/usr/lib/mykeystore.jks"/&gt;
      &lt;property name="keyStorePassword" value="mypass"/&gt;
      &lt;property name="trustStore" value="/usr/lib/mycacerts"/&gt;
      &lt;property name="trustStorePassword" value="changeit"/&gt;
   &lt;/bean&gt;
  
   &lt;bean id="pooledSecureConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"&gt;
      &lt;property name="maxConnections" value="10"/&gt;
      &lt;property name="connectionFactory" ref="jmsSecureConnectionFactory"/&gt;
   &lt;/bean&gt;
  
   &lt;bean id="txSecureManager" class="org.springframework.jms.connection.JmsTransactionManager"&gt;
      &lt;property name="connectionFactory" ref="pooledSecureConnectionFactory" /&gt;
   &lt;/bean&gt;
  
   &lt;bean id="jmsSecureConfig" class="org.apache.camel.component.jms.JmsConfiguration"&gt;
      &lt;property name="connectionFactory" ref="pooledSecureConnectionFactory" /&gt;
      &lt;property name="testConnectionOnStartup" value="true"/&gt;
      &lt;property name="transacted" value="true"/&gt;
      &lt;property name="transactionManager" ref="txSecureManager"/&gt;
   &lt;/bean&gt;
  
   &lt;bean id="activemqs" class="org.apache.activemq.camel.component.ActiveMQComponent"&gt;
      &lt;property name="configuration" ref="jmsSecureConfig" /&gt;
   &lt;/bean&gt;
  </code></pre>