Skip to content

Commit

Permalink
Fix fault tolerance method cache not being reset on CDI shutdown. (#8519
Browse files Browse the repository at this point in the history
)

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>
  • Loading branch information
tomas-langer authored Mar 22, 2024
1 parent 4397854 commit 1f739b8
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2023 Oracle and/or its affiliates.
* Copyright (c) 2018, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,6 +41,7 @@
import jakarta.enterprise.inject.spi.AnnotatedType;
import jakarta.enterprise.inject.spi.BeanManager;
import jakarta.enterprise.inject.spi.BeforeBeanDiscovery;
import jakarta.enterprise.inject.spi.BeforeShutdown;
import jakarta.enterprise.inject.spi.Extension;
import jakarta.enterprise.inject.spi.ProcessAnnotatedType;
import jakarta.enterprise.inject.spi.ProcessManagedBean;
Expand Down Expand Up @@ -244,6 +245,11 @@ void validateAnnotations(BeanManager bm,
}
}

void close(@Observes BeforeShutdown shutdown) {
// we need to clear method cache, as the next start could use different config
MethodInvoker.clearMethodStatesMap();
}

/**
* Creates the executors used by FT using config. Must be created during the
* {@code AfterDeploymentValidation} event.
Expand Down

0 comments on commit 1f739b8

Please sign in to comment.