I am using wildfly 9.0.1.Final
I am deploying a REST application which has an endpoint defined like this:
@GET
@Path("/view/products")
@Produces(MediaType.APPLICATION_JSON)
@CORSEnabled
@Protected
public String getConfiguredProducts(
@Context ContainerRequestContext request) {
if (request != null) {
Integer companyId = (Integer) request.getProperty("company");
if (companyId != null) {
//do stuff
}
}
// ... more staff
}
When the application runs, the context is injected, i.e. 'request' is non null.
When I try though to retrieve the property I get back the error:
executing GET /complaints/view/products:
org.jboss.resteasy.spi.LoggableFailure: Unable to find contextual data
of type: javax.ws.rs.container.ContainerRequestContext
Please note that the application was running without problems on glassfish/jersey and the problem appeared when I tried to move it to wildfly/resteasy.
Any ideas?