forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate child management context with parent context's lifecycle
Previously, the child management context was created when the parent context's web server was initialized and it wasn't stopped or closed until the parent context was closed. This resulted in the child context being left running when the parent context was stopped. This would then cause a failure when the parent context was started again as another web server initialized event would be received and a second child management context would be started. This commit updates the initialization of the child management context to integrate it with the lifecycle of the parent context. The management context is now created the first time the parent context is started. It is stopped when the parent context is stopped and restarted if the parent context is started again. This lifecycle management is done using a phase that ensures that the child context is not started until the parent context's web server has been started. Fixes spring-projectsgh-38502
- Loading branch information
1 parent
de8b304
commit 9c68a2a
Showing
2 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters