df created DELTASPIKE-1475:
------------------------------

             Summary: CDI Container Control does not create HttpServletRequest
                 Key: DELTASPIKE-1475
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1475
             Project: DeltaSpike
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: CdiControl
    Affects Versions: 1.9.6
         Environment: EE8
Tomcat 9.0.89
Weld 3.1.9
Resteasy 4.7.9
Quartz 2.3.2
Deltaspike-Scheduler 1.9.6
            Reporter: df


I get a "Attempt to access the request/response without an active HTTP request" 
error in the following scenario:
 * Application scoped bean with DeltaSpike Scheduler injection
 * The bean calls: scheduler.registerNewJob(Worker.class)
 * Worker runs a JAX-RS request
 * An JAX-RS ClientRequestFilter and ClientResponseFilter filter is triggered 
(annotated with @ApplicationScoped and @Provider)
 * The filter has: @Inject @DeltaSpike Provider<HttpServletRequest> which 
throws an error once the cdi provider is resolved
--> error

 

Debugging notes:
 * 
org.apache.deltaspike.servlet.impl.produce.ServletObjectProducer#getHttpServletRequest
 is called, but RequestResponseHolder.REQUEST.get() throws an error
 * The WeldContextControl starts the Session and Request scopes but they only 
seem to store a state in the RequestContextHolder ThreadLocal

Do I miss something? It seems the context controller does not really start a 
HttpServletRequest as the container would.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to