-
Bug
-
Resolution: Done
-
Major
-
19.0.0.Beta1
-
None
Say I have a @Timeout method in my application, which uses a @RequestScoped service:
@Inject private MyService service; @Timeout public String doSomething() throws InterruptedException { return "Hello " + service.call(); }
The method isn't @Asynchronous, so it's supposed to be executed on the caller thread and hence the CDI contexts should be available. However, they are not:
2018-04-03 21:16:35,976 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /: org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped
Clearly the @Timeout methods are always executed on a separate thread (see HystrixCommandInterceptor.initSetter):
// Async and timeout operations use THREAD isolation strategy if (operation.isAsync() || operation.hasTimeout()) { propertiesSetter.withExecutionIsolationStrategy(HystrixCommandProperties.ExecutionIsolationStrategy.THREAD); } else { propertiesSetter.withExecutionIsolationStrategy(HystrixCommandProperties.ExecutionIsolationStrategy.SEMAPHORE); }
- is blocked by
-
WFLY-13024 Integrate MP Fault Tolerance 2.1
- Closed