The creation of new JMS connection (after reset) is done in local method field (instead of instance field directly) to prevent situation, when connection is not correctly configured/prepared in case when JMSException from prepare() method is thrown.

See gh-29115

Comment From: pivotal-cla

@lenoch7 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@lenoch7 Thank you for signing the Contributor License Agreement!

Comment From: lenoch7

I made next commit (I am very sorry, squash can be done later of course). This change should prevent to leave reference to SingleConnectionFactory (via exception listener) in invalid connection in case when connection.start() method throws JMSException.

Comment From: lenoch7

I squash my two commits and rebase it on current HEAD. Is something still missing in this PR? What I can do?

Comment From: lenoch7

Thank you for merge.