[ 
https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grzegorz Kossakowski updated COCOON-2216:
-----------------------------------------

    Attachment: multi-thread-simple-28.09.2008.patch

Hello,

I just wanted to let you know that I've finally tackled this problem using much 
more simpler approach than the one I planned to use. Anyway, it looks like this 
patch fixes the specific problem you have.

There are two important notes, though:
1. This patch was tested using your test-case and regular Cocoon samples only
2. This patch is still not a *complete* solution to all OM-related problems 
that I'm aware off but brings us much closer to final solution because it at 
least fixes issue with multi-thread environments.

I'd would appreciate any feedback on it (testing) before I continue to work in 
this direction.

Also, I've published my local Git branch established for changes related to 
this issue, see:
http://github.com/gkossakowski/apache-cocoon/tree/COCOON-2216-multi-thread-simple

You can easily clone this repo using:
git clone git://github.com/gkossakowski/apache-cocoon.git

and then switch to my local branch using git gui command. Another method is 
just using download button so you download the entire source code.

I mention this second method of getting my changes (instead of patch) because 
it's more likely that my repository at GitHub will be up-to-date with my 
changes compared to patches attached to JIRA. Moreover, it's easier to analyse 
my changes using GitHub website.

> IncludeCacheManager can not perfom parallel includes
> ----------------------------------------------------
>
>                 Key: COCOON-2216
>                 URL: https://issues.apache.org/jira/browse/COCOON-2216
>             Project: Cocoon
>          Issue Type: Bug
>          Components: - Components: Sitemap
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Christoph Gaffga
>            Assignee: Grzegorz Kossakowski
>         Attachments: cocoon-trunk.patch, 
> multi-thread-simple-28.09.2008.patch, 
> ParallelInclusionProblem-cocoon_TRUNK.patch, test-block.zip, test-webapp.zip
>
>
> Since we migrated from cocoon 2.1 to 2.2 a generator that merges multiple 
> sources from other cocoon pipelines into one (similar to the aggregator) is 
> not working anymore.
> We also posted our problem to the mailing list, got little feedback but it 
> brought us on the right way...
> see also: http://www.mail-archive.com/[EMAIL PROTECTED]/msg42173.html
> I found out that it's a problem with the DefaultIncludeCacheManager, that can 
> not do parallel inclusion of cocoon-pipelines anymore. I checked several 
> classes where inclusion is used. In the aggregator parallel inclusion is not 
> an option anymore, in CIncludeTransformer the IncludeCacheManager is used, 
> but it can't do parallel inclusion. In the new IncludeTransfomer parallel 
> inclusion is supported, but it does not use caching as it does not use the 
> IncludeCacheManager...
> But we needed caching AND parallel processing, so I tried to find out what's 
> broken in the DefaultIncludeCacheManager:
> and it seems that the ThreadLocal variables are not initialized for the child 
> threads that do the inclusion. Neither the spring context nor the old 
> environment stuff was initialized. And all the source resolving was done 
> outside the child thread and that way using the wrong thread context. 
> We were able to fix that issue by small changes to DefaultIncludeCacheManager 
> and IncludeCacheManagerSession. It would be great if somebody could apply 
> this patch so we don'T have to patch every cocoon version again and again...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to