[
https://issues.apache.org/jira/browse/COCOON-1857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500702
]
Eddy Fras commented on COCOON-1857:
-----------------------------------
As I already explained to Brian by mail, I found another solution to have
sitemap components available in instrumentation :
- I created a class extending DefaultInstrumentManagerConnector, defined as a
connector in the instrumentation configuration file. It allows me getting a
reference to the main InstrumentManager used by Cocoon.
- I created a new MySitemapLanguage class, extending SitemapLanguage and
overriding the createComponentManager() method in which I call
setInstrumentManager with the instrumentManager I got from my connector.
- MySitemapLanguage is declared as the sitemap language class to use in a
treeprocessor-builtins.xml file, itself declared as a "config" attribute of the
<sitemap> element in the cocoon.xconf file.
Doing this, I'm able to see all sitemap components as instrumentables in the
instrumentation standalone client or through the web interface.
But, if I'm trying to get these instrumentables programmatically, it does not
work.
This instrumentable children of the component-manager, got with a call to
getChildInstrumentableDescriptors() are : classloader, component,
entity-resolver, ... but the generators, transformers, serializers, actions,
... are not available.
What is really strange is that when I create a sample value of a pool size of a
transformer using the standalone client, it generates in the sample file
(cocoon.sampledata) :
<instrumentable name="component-manager">
<instrumentable name="component-manager.generators">
<instrumentable name="component-manager.generators.mygenerator">
<instrumentable name="component-manager.generators.mygenerator.pool">
<instrument name="component-manager.generators.mygenerator.pool.size">
When I restart my webapp with this file updated, I can see my generator pool
size when I make calls to getChildInstrumentableDescriptors().
Can someone understand what's happenning ?
> Sitemap Components Do Not Appear in Instrumentation
> ---------------------------------------------------
>
> Key: COCOON-1857
> URL: https://issues.apache.org/jira/browse/COCOON-1857
> Project: Cocoon
> Issue Type: Bug
> Components: - Components: Sitemap
> Affects Versions: 2.1.9
> Reporter: Brian Vargas
> Assignee: Carsten Ziegeler
> Attachments: CocoonComponentManager.java.patch
>
>
> Although I have correctly added Excalibur instrumentation code to custom
> sitemap components, those components never show up when connecting with the
> instrumentation client.
> Specifically, the behavior we are seeing is that setInstrumentableName() gets
> called on our custom reader, as expected, but then neither getInstruments()
> nor getChildInstrumentables() ever gets called.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.