**[Alfons Spiegelhauer](https://jira.spring.io/secure/ViewProfile.jspa?name=spiegelhauer)** opened **[SPR-3059](https://jira.spring.io/browse/SPR-3059?redirect=false)** and commented Method AbstractMessageListenerContainer.refreshSharedConnection After line ConnectionFactoryUtils.releaseConnection(this.sharedConnection, getConnectionFactory(), running); this.sharedConnection should be set to null. After the call to ConnectionFactoryUtils.releaseConnection the connection is logically closed protected final void refreshSharedConnection() throws JMSException { boolean running = isRunning(); synchronized (this.sharedConnectionMonitor) { ConnectionFactoryUtils.releaseConnection(this.sharedConnection, getConnectionFactory(), running); > this.sharedConnection = null; Connection con = createConnection(); try { prepareSharedConnection(con); } catch (JMSException ex) { JmsUtils.closeConnection(con); throw ex; } this.sharedConnection = con; } } --- **Affects:** 2.0.2
Activity
spring-projects-issues commentedon Jan 20, 2007
Juergen Hoeller commented
Thanks for spotting this! Indeed, in particular for the exception case, we need to reset the "sharedConnection" variable there.
Juergen