-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement
Milestone
Description
Eric Vigeant opened SPR-13425 and commented
Here is some simple code that will show the pattern:
ClassPathXmlApplicationContext ctx = ...
ctx.refresh(); // This works as expected
ctx.close(); // This closes the context correctly
ctx.refresh(); // This restarts the context properly
ctx.close(); // This does NOT close the contextI traced it down to the "closed" field in AbstractApplicationContext, it is initialized to false, it is set to true when closing, but it is never set again to false after it is restarted. This causes the doClose() method to do nothing.
Affects: 4.1.7, 4.2 GA
Issue Links:
- Close processing triggered by shutdown hook isn't thread safe [SPR-13556] #18132 Close processing triggered by shutdown hook isn't thread safe
Referenced from: commits 811de8e, 57125c0
Backported to: 4.1.8
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement