Repository: quarkusio/quarkus
Issue: Hot reload with context propagation/quarkus-smallrye-reactive-messaging-kafka fails

**Describe the bug**
After a reload, an application that uses quarkus-smallrye-reactive-messaging-kafka fails with 
https://gist.github.com/michalszynkiewicz/c71dba7a6f3d10b54adc3b2e2406a603

**Expected behavior**
The application should be reloaded

**Actual behavior**
An app that uses smallrye-reactive-messaging-kafka fails to reload when working with mvn quarkus:dev.
Instead it throws: https://gist.github.com/michalszynkiewicz/c71dba7a6f3d10b54adc3b2e2406a603

Changing the `SmallRyeContextPropagationTemplate#configureStaticInit` to: https://gist.github.com/michalszynkiewicz/eec489d443a675556ab5c95e0c728071 makes the app restart properly.


**To Reproduce**
Steps to reproduce the behavior:
```
mvn io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:create     -DprojectGroupId=com.example     -DprojectArtifactId=reproducer     -DclassName=com.example.ads.AdResource -Dpath=/ads -Dextensions=quarkus-smallrye-reactive-messaging-kafka,io.quarkus:quarkus-smallrye-reactive-messaging,quarkus-hibernate-orm-panache

cd reproducer; mvn clean compile quarkus:dev
```
in another konsole:
```

sed -e '13a ;' -i src/main/java/com/example/ads/AdResource.java
# or modify the fline somehow if you don't have sed

curl localhost:8080/ads
```

**Environment (please complete the following information):**
 - Output of `uname -a` or `ver`:  Linux t580 5.0.16-200.fc29.x86_64 #1 SMP Tue May 14 18:27:35 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
 - Output of `java -version`: 
```
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
```
 - GraalVM version (if different from Java): not applicable

 - Quarkus version or git rev: f438459b065eb9a5feed44270d08edd811024abd

**Additional context**
(Add any other context about the problem here.)


Changed files:
extensions/smallrye-context-propagation/runtime/src/main/java/io/quarkus/smallrye/context/runtime/SmallRyeContextPropagationTemplate.java

diff --git a/extensions/smallrye-context-propagation/runtime/src/main/java/io/quarkus/smallrye/context/runtime/SmallRyeContextPropagationTemplate.java b/extensions/smallrye-context-propagation/runtime/src/main/java/io/quarkus/smallrye/context/runtime/SmallRyeContextPropagationTemplate.java
index d6d4a48b668..ed25b18ed81 100644
--- a/extensions/smallrye-context-propagation/runtime/src/main/java/io/quarkus/smallrye/context/runtime/SmallRyeContextPropagationTemplate.java
+++ b/extensions/smallrye-context-propagation/runtime/src/main/java/io/quarkus/smallrye/context/runtime/SmallRyeContextPropagationTemplate.java
@@ -23,10 +23,14 @@ public class SmallRyeContextPropagationTemplate {
     public void configureStaticInit(List<ThreadContextProvider> discoveredProviders,
             List<ContextManagerExtension> discoveredExtensions) {
         // build the manager at static init time
-        ContextManagerProvider contextManagerProvider = new SmallRyeContextManagerProvider();
-        ContextManagerProvider.register(contextManagerProvider);
+        // 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);
+        }
+
         // do what config we can here, but we need the runtime executor service to finish
-        builder = (SmallRyeContextManager.Builder) contextManagerProvider
+        builder = (SmallRyeContextManager.Builder) ContextManagerProvider.instance()
                 .getContextManagerBuilder();
         builder.withThreadContextProviders(discoveredProviders.toArray(new ThreadContextProvider[0]));
         builder.withContextManagerExtensions(discoveredExtensions.toArray(new ContextManagerExtension[0]));