A pooled thread outlives the request that set the value. The next task on that thread inherits it - so the entry never becomes garbage, and one user's tenant or principal is read by another user's request.
This topic is available to PRO members.
Open this topic Go PRO Sign in Create a free accountRun this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-25