I think you're right, the JNDI connection is not recycled. Note however, this is not a full explanation. Most probably it's very implementation-specific, e.g. I had similar symptoms (unable to recover) with JBoss when running in HA/clustered mode with HA-JNDI, but it worked flawlessly with normal JNDI.
I've done some further digging. The JNDI context is created near initJndiContext() in JMSMessageConnector. This is only called from the doConnect(), if connectionFactory == null method. If somewhere the connection with the JNDI store is lost, the jndiContext
member will fail when doing getJndiDestination() in Jms11Support. Therefore the reconnect strategy does not cover loss of connections with JNDI stores. Am I correct?
Pleas note, I am not criticizing anything, just looking for the right
solution ;)