Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMQP-764: Move Setting stopped to destroy() [Backport] #653

Closed
wants to merge 1 commit into from

Conversation

garyrussell
Copy link
Contributor

JIRA: https://jira.spring.io/browse/AMQP-764

Fixes #651

Previously, stopped was set in stop() after the context was closed.
This was done to prevent inadvertent re-opening of the connection which
would prevent the application from terminating.

This was too early since other beans destroyed before the factory might
need to send messages.

Remove Smartlifecycle and move setting stopped to destroy(), but
still only after the context is closed; since destroy() can be called
by users to reset the connection (although resetConnection() is now the
preferred way to do that.

cherry-pick to 1.6.x

JIRA: https://jira.spring.io/browse/AMQP-764

Fixes spring-projects#651

Previously, `stopped` was set in `stop()` after the context was closed.
This was done to prevent inadvertent re-opening of the connection which
would prevent the application from terminating.

This was too early since other beans destroyed before the factory might
need to send messages.

Remove `Smartlifecycle` and move setting `stopped` to `destroy()`, but
still only after the context is closed; since `destroy()` can be called
by users to reset the connection (although `resetConnection()` is now the
preferred way to do that.

Conflicts:
	spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactory.java
Resolved.
@garyrussell garyrussell changed the title AMQP-764: Move Setting stopped to destroy() AMQP-764: Move Setting stopped to destroy() [Backport] Aug 25, 2017
@artembilan
Copy link
Member

Merged as fed485a and cherry-picked to 1.6.x as 5623996.

@artembilan artembilan closed this Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants