title: Spring JMS CachingConnectionFactory doesn't seem to reconnect on exception
body: <p>The JMS connection didn't get reconnected when this exception happened:</p>
  
  <pre><code>2014-08-16 10:51:36,724 WARN  [TIBCO EMS TCPLink Reader (Server-12486338)] connection.CachingConnectionFactory - Encountered a JMSException -    resetting the underlying JMS Connection
  javax.jms.JMSException: Connection has been terminated
      at com.tibco.tibjms.Tibjmsx.buildException(Tibjmsx.java:502)
      at com.tibco.tibjms.TibjmsConnection._onDisconnected(TibjmsConnection.java:2286)
      at com.tibco.tibjms.TibjmsConnection$ServerLinkEventHandler.onEventDisconnected(TibjmsConnection.java:341)
      at com.tibco.tibjms.TibjmsxLinkTcp$LinkReader.work(TibjmsxLinkTcp.java:320)
      at com.tibco.tibjms.TibjmsxLinkTcp$LinkReader.run(TibjmsxLinkTcp.java:247)
  2014-08-16 10:51:40,286 WARN  [TIBCO EMS TCPLink Reader (Server-12494013)] connection.CachingConnectionFactory - Encountered a JMSException - resetting the underlying JMS Connection
  javax.jms.JMSException: Connection has been terminated
      at com.tibco.tibjms.Tibjmsx.buildException(Tibjmsx.java:502)
      at com.tibco.tibjms.TibjmsConnection._onDisconnected(TibjmsConnection.java:2286)
      at com.tibco.tibjms.TibjmsConnection$ServerLinkEventHandler.onEventDisconnected(TibjmsConnection.java:341)
      at com.tibco.tibjms.TibjmsxLinkTcp$LinkReader.work(TibjmsxLinkTcp.java:320)
      at com.tibco.tibjms.TibjmsxLinkTcp$LinkReader.run(TibjmsxLinkTcp.java:247)
  </code></pre>
  
  <p>The exact same error happened a few seconds apart and I wonder if Spring tried to reconnect and gave up after two tries.</p>
  
  <p>I checked Spring source code and didn't find reconnection logic in onException() method in either CachingConnectionFactory or its parent class SingleConnectionFactory.  We're using spring-jms 3.1.2 but I looked at the latest Spring source code as well.</p>
  
  <p>Thanks for your help.</p>