When MicroProfile Context Propagation integration is not enabled, SmallRye Fault Tolerance obeys the MicroProfile Fault Tolerance specification and always activates the CDI request context for @Asynchronous method invocations.
However, when MicroProfile Context Propagation integration is enabled, we leave everything to Context Propagation. This means that if the request context is not active on the original thread, it isn't active during the @Asynchronous method invocation either. This is contrary to the spec, but makes more sense from the Context Propagation perspective.
I have implemented a fix that enforces request context activation even in presence of Context Propagation integration, but I'm not sure if that's correct. I tend to think that the current behavior is more appropriate, but we can debate it here.
(Note that in Quarkus, SmallRye Fault Tolerance always has the Context Propagation integration enabled.)
When MicroProfile Context Propagation integration is not enabled, SmallRye Fault Tolerance obeys the MicroProfile Fault Tolerance specification and always activates the CDI request context for
@Asynchronous
method invocations.However, when MicroProfile Context Propagation integration is enabled, we leave everything to Context Propagation. This means that if the request context is not active on the original thread, it isn't active during the
@Asynchronous
method invocation either. This is contrary to the spec, but makes more sense from the Context Propagation perspective.I have implemented a fix that enforces request context activation even in presence of Context Propagation integration, but I'm not sure if that's correct. I tend to think that the current behavior is more appropriate, but we can debate it here.
(Note that in Quarkus, SmallRye Fault Tolerance always has the Context Propagation integration enabled.)