[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12636361#action_12636361 ] Grzegorz Kossakowski commented on COCOON-2216: -- Imran, It's my time to apologize. I didn't read your previous description carefully enough. Now I could reproduce your problem which is just a sign of much bigger problem. IncludeCacheManager uses thread pooling technique which does not play nicely with ThreadLocals, see: http://java.sys-con.com/node/37241 As I said this problem is not limited to the newly introduced Factory for ObjectModel. Servlet Service Fw and Spring itself use ThreadLocals as well. I think this is a right time to move this discussion to dev@ list so others can comment. I'll be probably in favour of removing thread pooling completely but I don't know performance implications at the moment. 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-block.zip, test-webapp.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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12636376#action_12636376 ] imran pariyani commented on COCOON-2216: hi Grzegorz, in the article there was something about Lack of a Standard Thread-Pooling Library .. now there is a standard which comes with the JDK .. i don't know if we are using that or not .. but it is possible that it might take care of the ThreadLocal variables .. just a thought. should i forward this discussion to the dev mailing list ? 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-block.zip, test-webapp.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.
Re: [jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
imran pariyani (JIRA) pisze: [ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12636376#action_12636376 ] imran pariyani commented on COCOON-2216: hi Grzegorz, in the article there was something about Lack of a Standard Thread-Pooling Library .. now there is a standard which comes with the JDK .. i don't know if we are using that or not .. but it is possible that it might take care of the ThreadLocal variables .. just a thought. Had a brief look and I fear that it's not that easy but I'm not an expert in this field. should i forward this discussion to the dev mailing list ? Yes, please. I have a really shaky internet access these days so any help is greatly appreciated. I hope others more experienced with multi-thread problems can give us some hints how finally tackle this problem. -- Grzegorz
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12636059#action_12636059 ] imran pariyani commented on COCOON-2216: Hi Grzegorz, were u able to reproduce the problem with the second test case and with your patch applied ? 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-block.zip, test-webapp.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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12636201#action_12636201 ] Grzegorz Kossakowski commented on COCOON-2216: -- Hi Imran, Sorry for next delay - this time I'm moving to a new flat. When it comes to your problem I've looked into sources of JX templates and found: Attr 1 :${cocoon.request.getParameter('attr1')}br/ I believe it should look like: Attr 1 :${cocoon.request.getAttribute('attr1')}br/ After applying this change both parameters and attributes works fine for me. Is there anything else missing? I would like to start polishing of my patch so it can be applied to trunk. 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-block.zip, test-webapp.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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12636231#action_12636231 ] imran pariyani commented on COCOON-2216: sorry for that typo .. but for me after changing it to attribute also its still the same .. i mean the fisrt time the page is loaded the attributes and the parameters are there .. but then when u keep clicking the links with the parameters most of the time the attributes are missing .. on each component at the ends there are links like: With Parameter 1 With parameter 1 and 2 With parameter 1,2 and 3 those are the three links .. and as i said if u keep clicking them most of the time the parameters and the attributes are missing .. without the params also the attribute should always be there .. but if i keep refreshing the page the attribute is also often missing did u change anything except for the changes present in the patch ? i have the source from your git repo so i think it should be the recent one .. 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-block.zip, test-webapp.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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635390#action_12635390 ] imran pariyani commented on COCOON-2216: Hi Grzegorz, thanks a bunch .. i will right away either apply the patch or else check out ur branch ... will let you know when i am done with testing .. thanks once again for ur efforts .. 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635531#action_12635531 ] imran pariyani commented on COCOON-2216: hi , tried to apply the patch to the current trunk .. but it keeps giving this error ERROR [main] (ContextLoader.java:214) - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cocoon.ajax.impl.servlet': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not create configuration for TreeProcesoor; nested exception is java.net.MalformedURLException: unknown protocol: blockcontext something seems to be broken in the trunk ... i will get the version from git and try to build with that ... in the mean while the error above is it because of the new dojo which we integrated with cocoon .. it builds successfully but when starting jetty it throws that error .. do u get the same error when starting the jetty server ? 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.
Re: [jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
imran pariyani (JIRA) pisze: [ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635531#action_12635531 ] imran pariyani commented on COCOON-2216: hi , tried to apply the patch to the current trunk .. but it keeps giving this error ERROR [main] (ContextLoader.java:214) - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cocoon.ajax.impl.servlet': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not create configuration for TreeProcesoor; nested exception is java.net.MalformedURLException: unknown protocol: blockcontext something seems to be broken in the trunk ... i will get the version from git and try to build with that ... in the mean while the error above is it because of the new dojo which we integrated with cocoon .. it builds successfully but when starting jetty it throws that error .. do u get the same error when starting the jetty server ? This looks like an old problem with cocoon-servlet-service-impl and cocoon-core but has been fixed a few weeks ago. Are you sure that all of your SNAPSHOT dependencies has been rebuilt? To answer your question directly: No I don't have any problem and I could run your test-case using mvn jetty:run directly from block. It displayed the page with CForm and parallel includes successfully. -- Grzegorz
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635585#action_12635585 ] imran pariyani commented on COCOON-2216: Hi Grzegorz, After building cocoon from git repo it works .. the generation is taking palce in parallel and also the OM is different for all the child threads but there is still some problem with the cocoon.request object ... somehow for some child thread the cocoon.request attributes are lost (sometimes)... is it that the cocoon.request attributes are not copied over to that OM which is created for that specific child thread? 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635591#action_12635591 ] Grzegorz Kossakowski commented on COCOON-2216: -- I'm glad to hear that it works for you. Is your test-case covering the issue with request attributes? How can I see this problem myself? At the moment I have no clue on what might be happening when it comes to request attributes. 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635602#action_12635602 ] imran pariyani commented on COCOON-2216: well i can modify that test case so that it will consider some request attributes as well ... but other then that it works great .. thanks :) and ya you were right about that cocoon-servlet-service-impl had an old version of it in my repo ... i will do the necessary changes to the test case and upload them here. 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12635633#action_12635633 ] imran pariyani commented on COCOON-2216: have attached both the blocks again ... actually webapp block is the same without any changes .. below the components there are three links .. one with one param , second one with 2 params and the thrid one with 3 params ... and i set one request attribute in the class pagegenerator ... so the request attribute should always be displayed .. and the request parameters depends on the link you click ... so if you click the first link then the first parameter should be displayed and so on ... but as you will notice the attribute and the parameters are displayed only sometimes .. very rarely.. i access the params in the jx pages .. with ${cocoon.request.getParameter('param1')} so they should always be there if they are present in the url ... 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-block.zip, test-webapp.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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12632014#action_12632014 ] Grzegorz Kossakowski commented on COCOON-2216: -- Hello Christoph and Imran. First of all I want to say that I did *not* forget about this issue and I've spent lots of time working on it. Actually I did not report or share anything because I felt somehow embarrassed by the fact that I've taken four different (from scratch) attempts to tackle this issue without any significant success. This problem is even more difficult (at least to me) than I thought, unfortunately. Right now I'm working on fifth attempt which is probably the ugliest design I've ever made but I have really no clue how to make it better. I'm just in process of fixing broken ITs and test cases. I hope to have something workable tomorrow (I expect to have a whole day free so I should spend some time on testing and polishing the code) but this will be far from being something acceptable for trunk. I guess I'll need some help of other folks but first I'll need to explain in detail what's the actual problem which is not the easiest task as well... Grzegorz (hating Cocoon's Core with even bigger passion and starting to wonder if my GSoC work on ObjectModel does not share bad design with Cocoon Core...) 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, 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12632028#action_12632028 ] Grzegorz Kossakowski commented on COCOON-2216: -- Small update: I've just realized that the reason for my troubles *might* be caused by the fact that I insisted on clean isolation between different stages of pipeline (or in general sitemap, or even more in general request processing) execution so no data is being transferred from one stage to another. We all think that globals are bad, don't we? However, it looks like that was my major mistake because Cocoon internals were never designed this way and thus my changes introduced endless stream of bugs or quirks. I'll try to check my findings tomorrow. Actually... today as it's already 2am here. 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, 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12631632#action_12631632 ] imran pariyani commented on COCOON-2216: any luck with this issue ? .. it is a major performance blocker for our application .. if not a fix some small workaround will also do for the time being till its fixed ... we do have a small workaround but its quite ugly .. and with that we cant generate cforms in parallel .. 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, 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12624370#action_12624370 ] Grzegorz Kossakowski commented on COCOON-2216: -- Hi Imran, I worked on this issue for a few hours but this turned out to be even more complicated than I thought so I have no working code yet and tomorrow I won't be able to work on this. :( As I said, the idea is to create custom bean factory, I've started to write a prototype of it: package org.apache.cocoon.components.pipeline.spring; import java.util.Stack; public class ObjectModelFactoryBean implements FactoryBean { private InheritableThreadLocalStackObjectModel objectModelStack = new InheritableThreadLocalStackObjectModel() { protected StackObjectModel initialValue() { StackObjectModel newStack = new StackObjectModel(); newStack.push(createObjectModel()); return newStack; }; protected StackObjectModel childValue(StackObjectModel parentValue) { StackObjectModel newStack = new StackObjectModel(); try { newStack.push((ObjectModel)parentValue.peek().clone()); } catch (CloneNotSupportedException e) { // TODO Have to add some logging e.printStackTrace(); } return newStack; }; }; public Object getObject() throws Exception { synchronizeStack(); return objectModelStack.get().peek(); } public ClassObjectModel getObjectType() { return ObjectModel.class; } public boolean isSingleton() { return false; } /** * This method is heart of this class. * It's purpose is to synchronize its own internal stack with stack maintained by Servlet Service Framework * for servlet: calls and stack maintained by Cocoon Core for cocoon: calls. */ protected void synchronizeStack() { //no implementation at the moment } protected ObjectModel createObjectModel() { //here we'll need to create ObjectModelImpl instance //and inject all initial values return null; } } Only once I started to write it I realized that there is a problem with cyclic dependencies caused by this class. The point is that, synchronizeStack must have an access to both Cocoon Core and Servlet Service Framework classes and itself must be placed in Cocoon Core. But, by design, Cocoon core cannot depend on SSF. If I decide to put it somewhere then cyclic dependencies are starting to appear. I have some ideas how to create two different object factories and design whole thing in layered why so layers can be independent but this will take me some time. On the other hand, this issue has got a higher priority for me because my company that I'm working at want to have it fixed as well so at least you can be sure that it will get fixed sooner or later. I'll continue my work on this issue on monday and I'll have to fix it until Friday because later on I'll be busy with completely Cocoon-unrelated stuff. 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, 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
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12624395#action_12624395 ] imran pariyani commented on COCOON-2216: Hi Grzegorz, I appreciate your efforts Thanks .. would like to see the implementation of the method synchronizeStack() .. hope to see it by next friday :) 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, 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12624430#action_12624430 ] Christoph Gaffga commented on COCOON-2216: -- I'm curious on the solution of this bug also. And do you know what, we had the same problem with multi-threading and parallel processing with cocoon 2.1 when it came out. As I remember Carsten Ziegeler fixed the component manager then. So I was surprised that the same issue was introduced again into 2.2. Seems nobody is really using parallel aggregation, so never tested. But it's a great feature for content aggregation! 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, 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12623350#action_12623350 ] imran pariyani commented on COCOON-2216: great !! .. i will wait for the patches .. thanks :) 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, 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12623150#action_12623150 ] Grzegorz Kossakowski commented on COCOON-2216: -- After applying your patch I've managed to reproduce your problem. I have some plan how to fix problems with ObjectModel but this will involve: 1. Enforcing that OM implementation implements Cloneable interface (change to API) 2. Implementing custom FactoryBean for OM in cocoon-sitemap-impl that will be aware of issues related to threads (but not only to threads, there some other, even more tricky issues waiting for someone to discover). 3. Making this custom FactoryBean aware of servlet: calls is crucial as well. I've already created a branch in my Git repository for this issue and started to play with code. If nothing unplanned happens, I'll be able to give you some patches for testing upcoming week. 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, 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12622964#action_12622964 ] Grzegorz Kossakowski commented on COCOON-2216: -- Sorry for big delay but I was busy with other tasks which got a higher priority. Finally I'm finished and I have some free time to spend on this issue which (to be honest) is not the easiest one. Now I'll at least try to reproduce your problem and try to estimate how much of work is needed to fix this in proper way. 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, 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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12615481#action_12615481 ] imran pariyani commented on COCOON-2216: have attached the test case to reproduce the error .. i have attached three files .. test-block is the main block .. webapp is for running that block .. before that u will have to apply the patch cocoon-trunk.patch to the cocoon other wise it wont work at all ... for both the block perform mvn install .. and then for from inside the webapp block mvn jetty:run so the page http://localhost:/test-block/index.html is generated using the parallel generator .. if ur lucky and dont get the error the first time then just refresh and am sure the error will be there .. there are five components included in that page ... out of which 4 are normal jx components and the fifth one is cforms component ... all the jx component have been assigned different instance of the same object but still the properties displayed on the page shows the same value(they should be different) .. if u execute query for these components individually then they appear without any error .. links for querying them individually [jx components .. shows xml output .. forgot to add the pipeline to serialize it to html.. u can add one] http://localhost:/test-block/showjx http://localhost:/test-block/showjx1 http://localhost:/test-block/showjx2 http://localhost:/test-block/showjx3 [cforms component] http://localhost:/test-block/form2bean.flow most of the time we get the error Caused by: org.apache.commons.jxpath.JXPathException: No value for xpath: $cocoon/continuation/id its because the objectmodel is being changed by all the components simultaneously ...the error is there in the log file not on the page .. on the page it will just ignore that component 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 Attachments: cocoon-trunk.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.
[jira] Commented: (COCOON-2216) IncludeCacheManager can not perfom parallel includes
[ https://issues.apache.org/jira/browse/COCOON-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12613580#action_12613580 ] Christoph Gaffga commented on COCOON-2216: -- the patch fixes the DefaultIncludeCacheManager, so it can do parallel includions, but their still is an issue with the ObjectModel that does not support multi-threading. Resulting in random strange exceptions. Still need to be fixed 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 Attachments: ParallelInclusionProblem-cocoon_TRUNK.patch 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.