|
Ok we could add that. beforeExecute and afterExecute seem good names too.
Just to clarify, the plugged hook will be invoked by each thread, concurrently. So the implementor of the above interface will need to be threadsafe, but also you will need to consider that whatever you inject in the ThreadLocal, will also be used concurrently. Are you good with that? Possibly you might need to use your beforeExecute hook to create a different (independent) copy of the services which you're injecting in the TheadLocal.
Out of curiosity, what are you having in these threadlocal variables?
|