We are using @Async for multithreading. Untill each multithreading method i can see values for RequestContextHolder.getRequestAttributes().
But when i debug inside the method i'm getting request attributes as NULL.
Any thoughts?
To get around this issue we created a ContextAwareRunnable Object that was pre-populated with the current requestHolder, securityContextHolder, etc, so that all spawned threads would be able to execute as if it were running in the main thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With