[jira] Commented: (COCOON3-53) Cocoon 3: XMLSerializer caches all
[ https://issues.apache.org/jira/browse/COCOON3-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843037#action_12843037 ] Jos Snellings commented on COCOON3-53: -- ParameterCacheKey, constructed with the request parameters effectively cures the problem. This issue is closed! Suggestion: Developers starting out with cocoon 3 are very much likely to leave the routine "constructCacheKey()" as they find it. It would be good to provide a lightly annotated example in the samples! I will post one. > Cocoon 3: XMLSerializer caches all > -- > > Key: COCOON3-53 > URL: https://issues.apache.org/jira/browse/COCOON3-53 > Project: Cocoon 3 > Issue Type: Bug > Components: cocoon-pipeline >Reporter: Jos Snellings > > After startup, any pipeline/matcher ending in an xml-serializer will > produce the output of the first request after server startup, regardless of > the url, let alone parameters. > So the first xml pipe that is activated produces the expected output. > All subsequent calls will echo that output, whatever the url or parameters. > It takes a server restart to make a pipeline ending in an xml serializer work > again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COCOON3-53) Cocoon 3: XMLSerializer caches all
[ https://issues.apache.org/jira/browse/COCOON3-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843002#action_12843002 ] Reinhard Poetz commented on COCOON3-53: --- The cache key has to contain everything that influences the output produced by the generator. I have no idea why HTML serialization makes a difference, but again, the logs should give you some hints. > Cocoon 3: XMLSerializer caches all > -- > > Key: COCOON3-53 > URL: https://issues.apache.org/jira/browse/COCOON3-53 > Project: Cocoon 3 > Issue Type: Bug > Components: cocoon-pipeline >Reporter: Jos Snellings > > After startup, any pipeline/matcher ending in an xml-serializer will > produce the output of the first request after server startup, regardless of > the url, let alone parameters. > So the first xml pipe that is activated produces the expected output. > All subsequent calls will echo that output, whatever the url or parameters. > It takes a server restart to make a pipeline ending in an xml serializer work > again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COCOON3-53) Cocoon 3: XMLSerializer caches all
[ https://issues.apache.org/jira/browse/COCOON3-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842997#action_12842997 ] Jos Snellings commented on COCOON3-53: -- Yes, I thought about that, SimpleCacheKey is all too Simple. I kept it mainly because it was in the samples: it is not expected that a generator produces the same result. but why do pipelines with the same Starters (Termgenerator or WorkspaceProvider) are perfectly OK with the cache when they end in html serialization? Anyway, I will use a parameter cache and verify the cache behaviour is correct. If it does, I close this issue. > Cocoon 3: XMLSerializer caches all > -- > > Key: COCOON3-53 > URL: https://issues.apache.org/jira/browse/COCOON3-53 > Project: Cocoon 3 > Issue Type: Bug > Components: cocoon-pipeline >Reporter: Jos Snellings > > After startup, any pipeline/matcher ending in an xml-serializer will > produce the output of the first request after server startup, regardless of > the url, let alone parameters. > So the first xml pipe that is activated produces the expected output. > All subsequent calls will echo that output, whatever the url or parameters. > It takes a server restart to make a pipeline ending in an xml serializer work > again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COCOON3-53) Cocoon 3: XMLSerializer caches all
[ https://issues.apache.org/jira/browse/COCOON3-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842993#action_12842993 ] Reinhard Poetz commented on COCOON3-53: --- Both generators (TermGenerator and WorkspaceProvider) create a SimpleCacheKey. A SimpleCacheKey is always valid and the equals method only checks the passed object is of type SimpleCacheKey. It is used for components that always create the same result if the passed events are the same (i.e. there are no external influences) You should use some other cache key implementation: Have a look at ParameterCacheKey or TimestampCacheKey. > Cocoon 3: XMLSerializer caches all > -- > > Key: COCOON3-53 > URL: https://issues.apache.org/jira/browse/COCOON3-53 > Project: Cocoon 3 > Issue Type: Bug > Components: cocoon-pipeline >Reporter: Jos Snellings > > After startup, any pipeline/matcher ending in an xml-serializer will > produce the output of the first request after server startup, regardless of > the url, let alone parameters. > So the first xml pipe that is activated produces the expected output. > All subsequent calls will echo that output, whatever the url or parameters. > It takes a server restart to make a pipeline ending in an xml serializer work > again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COCOON3-53) Cocoon 3: XMLSerializer caches all
[ https://issues.apache.org/jira/browse/COCOON3-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842967#action_12842967 ] Jos Snellings commented on COCOON3-53: -- Cocoon 3, checked out from SVN on 5 march, and built with eclipse. Detail: three urls, activating a pipe ending with an xml serializer. (Note: all other pipes work correctly as far as I could verify) http://localhost:8080/thesaurus/hierarchies?language=el, result = the greek hierarchies in the thesaurus http://localhost:8080/thesaurus/showterm.xml?id=1004, visualize a term http://localhost:8080/thesaurus/editor/workspace.xml?random=23948783 Here is what happens: SETUP, manufacturing cacheKey: ~ adding SimpleCacheKey(hashCode=3116185) for component ToptermsGenerator(hashCode=21535750) ~ adding org.apache.cocoon.pipeline.caching.parametercache...@f91f7142 for component XMLSerializer(hashCode=10730286) Creating CompoundCacheKey(hashCode=22406408 key=[SimpleCacheKey(hashCode=3116185), org.apache.cocoon.pipeline.caching.parametercache...@f91f7142]) for pipeline CachingPipeline(hashCode=33258683 components=[ToptermsGenerator(hashCode=21535750), XMLSerializer(hashCode=10730286)]) SETTING CACHE: org.apache.cocoon.pipeline.caching.SimpleCache (CachingPipeline.setCache() called) SETUP, manufacturing cacheKey for 2nd: ~ adding SimpleCacheKey(hashCode=4540490) for component TermGenerator(hashCode=16199287) ~ adding org.apache.cocoon.pipeline.caching.parametercache...@f91f7142 for component XMLSerializer(hashCode=23533966) Creating CompoundCacheKey(hashCode=16471030 key=[SimpleCacheKey(hashCode=4540490), org.apache.cocoon.pipeline.caching.parametercache...@f91f7142]) for pipeline CachingPipeline(hashCode=772032 components=[TermGenerator(hashCode=16199287), XMLSerializer(hashCode=23533966)]) The value is "FOUND" in cache!!!, Here is the xml for: cacheValue.writeTo(System.out): JDB: CachingPipeline Write cache value to output stream: κυβέρνηση / διοίκησηοργανισμοίφορείςπολιτιστικό αγαθόπεριοχέςενδιαφέρον πολιτιστικής κληρονομιάςκληρονομιάκαταγραφή και τεκμηρίωσηαρχεία καταγραφήςκατάλογος προστατευόμενων αγαθώννομικά μέσαπολεοδομικό σύστημαδιαχείριση κληρονομιάςιδιοκτησίαπαράνομες ενέργειεςτύποι επεμβάσεωνπολιτική επεμβάσεωνπρογράμματα επεμβάσεωνεργαλεία επέμβασηςεπαγγέλματαδεξιότητεςεκπαίδευση / επιμόρφωσηπρόσβαση και ερμηνείαχρηματο-οικονομικά συστήματαγενικές έννοιεςSETTING CACHE: org.apache.cocoon.pipeline.caching.SimpleCache Surprise! The Greek hierarchies! SETUP, now the call of "workspace": ~ adding SimpleCacheKey(hashCode=30181678) for component WorkspaceProvider(hashCode=27011377) ~ adding org.apache.cocoon.pipeline.caching.parametercache...@f91f7142 for component XMLSerializer(hashCode=28014118) Creating CompoundCacheKey(hashCode=31048679 key=[SimpleCacheKey(hashCode=30181678), org.apache.cocoon.pipeline.caching.parametercache...@f91f7142]) for pipeline CachingPipeline(hashCode=22316052 components=[WorkspaceProvider(hashCode=27011377), XMLSerializer(hashCode=28014118)]) JDB: CachingPipeline Write cache value to output stream: κυβέρνηση / διοίκησηοργανισμοίφορείςπολιτιστικό αγαθόπεριοχέςενδιαφέρον πολιτιστικής κληρονομιάςκληρονομιάκαταγραφή και τεκμηρίωσηαρχεία καταγραφήςκατάλογος προστατευόμενων αγαθώννομικά μέσαπολεοδομικό σύστημαδιαχείριση κληρονομιάςιδιοκτησίαπαράνομες ενέργειεςτύποι επεμβάσεωνπολιτική επεμβάσεωνπρογράμματα επεμβάσεωνεργαλεία επέμβασηςεπαγγέλματαδεξιότητεςεκπαίδευση / επιμόρφωσηπρόσβαση και ερμηνείαχρηματο-οικονομικά συστήματαγενικές έννοιες Surprise: the Greek hierarchies come again! Although the cache key is different in all three cases. So the thing to do is here to make the cache break news about its members and keys, and how equality is decided. By the way: 1. jmx-group-name plays no role herein as expected 2. should the url not be included in a key hash? > Cocoon 3: XMLSerializer caches all > -- > > Key: COCOON3-53 > URL: https://issues.apache.org/jira/browse/COCOON3-53 > Project: Cocoon 3 > Issue Type: Bug > Components: cocoon-pipeline >Reporter: Jos Snellings > > After startup, any pipeline/matcher ending in an xml-serializer will > produce the output of the first request after server startup, regardless of > the url, let alone parameters. > So the first xml pipe that is activated produces the expected output. > All subsequent calls will echo that output, whatever the url or parameters. > It takes a server restart to make a pipeline ending in an xml serializer work > again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COCOON3-53) Cocoon 3: XMLSerializer caches all
[ https://issues.apache.org/jira/browse/COCOON3-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842957#action_12842957 ] Jos Snellings commented on COCOON3-53: -- - No, I cannot say your test is wrong. The test clearly shows that the right response is returned from the cache - It must be somehow 'subtle' - Yesterday I looked into CachingPipeline and I found everything sound - Yet my test case on a browser stands. If you want I can describe it in detail ==> the next candidate to look at is simplecache. It is hard to imagine what can go wrong here, as it is based upon a map. The only thing I can imagine: - could it be that there is a situation where different cache keys map onto the same content? - my pipes have no jmxname. Can that be a problem? I think not. ==> the thing to do is probably: I try put a finger on the problem at my side and deliver a very specific test case, for I believe the problem is quite specific. I will keep this group posted. > Cocoon 3: XMLSerializer caches all > -- > > Key: COCOON3-53 > URL: https://issues.apache.org/jira/browse/COCOON3-53 > Project: Cocoon 3 > Issue Type: Bug > Components: cocoon-pipeline >Reporter: Jos Snellings > > After startup, any pipeline/matcher ending in an xml-serializer will > produce the output of the first request after server startup, regardless of > the url, let alone parameters. > So the first xml pipe that is activated produces the expected output. > All subsequent calls will echo that output, whatever the url or parameters. > It takes a server restart to make a pipeline ending in an xml serializer work > again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COCOON3-53) Cocoon 3: XMLSerializer caches all
[ https://issues.apache.org/jira/browse/COCOON3-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842756#action_12842756 ] Reinhard Poetz commented on COCOON3-53: --- I can't reproduce your problem: see #testCachingOfDifferentPipelines() http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sample-webapp/src/test/java/org/apache/cocoon/it/CachingOfPipelinesTest.java The pipeline can be found at http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sample/src/main/resources/COB-INF/sitemap.xmap, lines 50 - 56. Is my test wrong? > Cocoon 3: XMLSerializer caches all > -- > > Key: COCOON3-53 > URL: https://issues.apache.org/jira/browse/COCOON3-53 > Project: Cocoon 3 > Issue Type: Bug > Components: cocoon-pipeline >Reporter: Jos Snellings > > After startup, any pipeline/matcher ending in an xml-serializer will > produce the output of the first request after server startup, regardless of > the url, let alone parameters. > So the first xml pipe that is activated produces the expected output. > All subsequent calls will echo that output, whatever the url or parameters. > It takes a server restart to make a pipeline ending in an xml serializer work > again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COCOON3-53) Cocoon 3: XMLSerializer caches all
[ https://issues.apache.org/jira/browse/COCOON3-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842613#action_12842613 ] Jos Snellings commented on COCOON3-53: -- This is only true for CachingPipeline! AsyncCachingPipeline is not affected. > Cocoon 3: XMLSerializer caches all > -- > > Key: COCOON3-53 > URL: https://issues.apache.org/jira/browse/COCOON3-53 > Project: Cocoon 3 > Issue Type: Bug > Components: cocoon-pipeline >Reporter: Jos Snellings > > After startup, any pipeline/matcher ending in an xml-serializer will > produce the output of the first request after server startup, regardless of > the url, let alone parameters. > So the first xml pipe that is activated produces the expected output. > All subsequent calls will echo that output, whatever the url or parameters. > It takes a server restart to make a pipeline ending in an xml serializer work > again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.