In our company, we are developing a quasi-standard REST service running in Wildfly 10.1. Each request has a tenant’s header, which will be intercepted by the filter, and the tenant’s information will be stored within the @RequestScopedbean for later use at the rest or at the service level. So far, so good. Now we find out that some code inside the service uses the Java 8 parallel thread and could not use the @RequestScopedbean to find the current tenant. We checked it several times. Using non-parallel threads solved this problem for us.
Is this normal behavior? We are really confused that using standard Java 8 features violates the expected behavior of the container.
Are there any other criminals we need to take care of?
source
share