Skip to content

AbstractMessageListenerContainer.refreshSharedConnection [SPR-3059] #7745

@spring-projects-issues

Description

@spring-projects-issues

Alfons Spiegelhauer opened SPR-3059 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

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions