You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
The text was updated successfully, but these errors were encountered:
Ladicek
changed the title
should request context be activated if not active and context propagation is used?
should request context be force-activated for @Asynchronous methods if context propagation is used?
Jan 12, 2021
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.)
The text was updated successfully, but these errors were encountered: