Grzegorz Kossakowski wrote:
Therefore I would like to propose introduction of a new scope called
"request-inheritable" which would allow beans (like ObjectModel) to be
inherited but by cloning.
What do you think?
hmm, just tried to solve that problem and found that in
IncludeTransformer it works with threading and parallel processing. Only
for the DefaultIncludeCacheManager we are using in our replacement for
the aggregator to do parallel aggregation it is broken since version 2.2.
So I decided to patch the DefaultIncludeCacheManager to work in the same
way as the IncludeTransformer does, by setting up the child threads with
the same context/environment:
// Setup this thread's environment
RequestContextHolder.setRequestAttributes(
this.session.getRequestAttributes());
EnvironmentHelper.enterProcessor(this.session.getProcessor(),
this.session.getEnvironment());
I'll test this out, and if it work's I send in the patch.
Christoph