I have a bean that is currently request-scoped, and does some pretty heavy and time-consuming processing. As part of a refactor, we're making the heavy stuff run asynchronously in the background, as the response does not rely on it. The issue I'm hitting is that I can't use this bean in an async thread because of it's scope. I believe thread-scoping will work, but the spring docs recommend against it as it can lead to memory leaks if not done carefully.
Are there any other ways to go about this?