-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ThreadPoolTaskExecutor does not allow for decorating Runnables [SPR-13930] #18502
Comments
Dave Syer commented I believe the |
Dave Syer commented I was able to use reflection hacks to override the executor like this:
I'd be more than happy to try a workaround if anyone has an idea. |
Juergen Hoeller commented Actually, for that kind of purpose, you might be better off using our Even if Juergen |
Juergen Hoeller commented It might be even better to introduce a common strategy for this: |
Dave Syer commented Sounds good to me, since that was what I needed to do. Ideally I need it before 4.3, but I guess I can go with reflection hacks until then. |
Juergen Hoeller commented Just wondering: Would Juergen |
Juergen Hoeller commented As suggested above, I've introduced a Juergen |
Ruslan Al-Fakikh commented
Ruslan |
Julian Ruppel commented
|
Dave Syer opened SPR-13930 and commented
The fact that
ThreadPoolTaskExecutor.initializeExecutor()
is protected makes it a public extension point, and it returns anExecutor
, so you might expect that overriding it will result in the return value being used at run time. In fact it is not because theThreadPoolTaskExecutor
does (though its parent class) set a field called "executor" but then never uses it, preferring instead to use its own more specializedThreadPoolExecutor
.Affects: 4.2.4
Referenced from: commits 25be5e0
The text was updated successfully, but these errors were encountered: