Skip to content

Commit

Permalink
context propagation restart fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michalszynkiewicz committed May 28, 2019
1 parent 2826929 commit c9a8bfd
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ public class SmallRyeContextPropagationTemplate {
public void configureStaticInit(List<ThreadContextProvider> discoveredProviders,
List<ContextManagerExtension> discoveredExtensions) {
// build the manager at static init time
try {
ContextManagerProvider.instance();
// the previous line will throw if already configured
// in the live-reload mode, the provider instance may be already set in the previous start
if (ContextManagerProvider.INSTANCE.get() == null) {
ContextManagerProvider contextManagerProvider = new SmallRyeContextManagerProvider();
ContextManagerProvider.register(contextManagerProvider);
} catch (IllegalStateException ignored) {
// already set
}

// do what config we can here, but we need the runtime executor service to finish
Expand Down

0 comments on commit c9a8bfd

Please sign in to comment.