Issue #3440 Stop failed lifecycle
stop in reverse order. Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
76a37352f5
commit
7b407ecb6c
|
@ -131,7 +131,9 @@ public class ContainerLifeCycle extends AbstractLifeCycle implements Container,
|
|||
catch (Throwable t)
|
||||
{
|
||||
// on failure, stop any managed components that have been started
|
||||
for (Bean b : _beans)
|
||||
List<Bean> reverse = new ArrayList<>(_beans);
|
||||
Collections.reverse(reverse);
|
||||
for (Bean b : reverse)
|
||||
{
|
||||
if (b._bean instanceof LifeCycle && b._managed == Managed.MANAGED)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue