title: Solace Connectivity issue using Spring 4.x
body: <p>we are trying to create Solace JMS connection through Spring 4.x but
  we are facing below issue while running main class.</p>
  
  <p>INFO | Connection attempt failed to host '192.168.56.101' ConnectException com.solacesystems.jcsmp.JCSMPTransportException: (Client name: DESKTOP-330QOHF/7332/#000a0001   Local port: -1   Remote addr: 192.168.56.101:24) - Error communicating with the router. cause: java.net.ConnectException: Connection timed out: no further information ((Client name: DESKTOP-330QOHF/7332/#000a0001   Local port: -1   Remote addr: 192.168.56.101:24) - ) </p>
  
  <p>also find attached spring-context file for Solace server configuration.</p>
  
  <p>Thanks
  <code>Here is my Spring configuration</code></p>
  
  
  
  <p>http://www.springframework.org/schema/beans/spring-beans.xsd <a href="http://www.springframework.org/schema/jms" rel="nofollow noreferrer">http://www.springframework.org/schema/jms</a> <a href="http://www.springframework.org/schema/jms/spring-jms-3.1.xsd" rel="nofollow noreferrer">http://www.springframework.org/schema/jms/spring-jms-3.1.xsd</a>"
      xmlns:jms="http://www.springframework.org/schema/jms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://www.springframework.org/schema/beans">
      </p>
  
  <pre><code>&lt;bean autowire="default" lazy-init="default"
      class="org.springframework.jndi.JndiTemplate" id="solaceJndiTemplate"&gt;
  
      &lt;property name="environment"&gt;
  
          &lt;map&gt;
              &lt;entry value="smf://192.168.56.101:24" key="java.naming.provider.url" /&gt;
              &lt;entry value="com.solacesystems.jndi.SolJNDIInitialContextFactory"
                  key="java.naming.factory.initial" /&gt;
              &lt;entry value="spring_user@Solace_Spring_VPN" key="java.naming.security.principal" /&gt;
              &lt;entry value="spring_password" key="java.naming.security.credentials" /&gt;
          &lt;/map&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean autowire="default" lazy-init="default"
      class="org.springframework.jndi.JndiObjectFactoryBean" id="solaceConnectionFactory"&gt;
      &lt;property name="jndiTemplate" ref="solaceJndiTemplate" /&gt;
      &lt;property name="jndiName" value="JNDI/CF/ncs" /&gt;
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.jms.connection.CachingConnectionFactory"
      id="solaceCachedConnectionFactory"&gt;
      &lt;property name="targetConnectionFactory" ref="solaceConnectionFactory" /&gt;
      &lt;property name="sessionCacheSize" value="10" /&gt;
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.jndi.JndiObjectFactoryBean" id="destination"&gt;
      &lt;property name="jndiTemplate" ref="solaceJndiTemplate" /&gt;
      &lt;property name="jndiName" value="JNDI/Q/requests" /&gt;
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.jms.core.JmsTemplate" id="jmsTemplate"&gt;
      &lt;property name="connectionFactory" ref="solaceCachedConnectionFactory" /&gt;
      &lt;property name="defaultDestination" ref="destination" /&gt;
      &lt;property name="deliveryPersistent" value="true" /&gt;
      &lt;property name="explicitQosEnabled" value="true" /&gt;
  &lt;/bean&gt;
  -
  &lt;bean class="com.solacesystems.integration.spring.MessageProducer"
      id="messageProducer"&gt;
      &lt;property name="jmsTemplate" ref="jmsTemplate" /&gt;
  &lt;/bean&gt;
  &lt;bean class="com.solacesystems.integration.spring.MessageConsumer"
      id="messageConsumer"&gt;
  &lt;/bean&gt;
  -
  &lt;bean
      class="org.springframework.jms.listener.DefaultMessageListenerContainer"
      id="jmsContainer"&gt;
      &lt;property name="connectionFactory" ref="solaceCachedConnectionFactory" /&gt;
      &lt;property name="destination" ref="destination" /&gt;
      &lt;property name="messageListener" ref="messageConsumer" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>