Hi, Am 25.02.2013 um 10:45 schrieb Ian Boston:
> On Monday, February 25, 2013, Felix Meschberger wrote: > >> Hi, >> >> Am 25.02.2013 um 10:18 schrieb Ian Boston: >> >>> Ok, I'll have a go at addressing these issues tomorrow, including >>> registering the service as the repository starts, one stats Mbeans per >>> repository. I didn't like the introspection to get the repository config. >> >> ok. >> >>> >>> The reason for exposing the stats as a service was to allow a stats >> bundle >>> to consume the repository stats so that there was a single URL where all >>> stats could be made available. That could be done by tracking all Mbeans >>> but that might be a bit harder. >> The RepositoryStatistics (defined in the Jackrabbit API) should IMHO be >> accessible through the API -- Them not being accessible through the >> Jackrabbit API makes them close to useless ... Interesting API design ;-) > > > > Agreed, I suspect this was an oversight. The example servlets I have seen > wrapping the stats all appear to get hold of the repository context from a > request attribute. I know one application doing that and this application is prone to *not* program to the API but to the implementation ... sigh! Regards Felix > > > >> >> The problem is that -- technically -- there may be more than one >> repository service. So how would you correlate a Statistics Service with >> the corresponding Repository Service ? > > > > We name each MBean with a name reflecting the repository that it represents > ? Not certain yet how to derive a sensible name other than "default". > > Ian > > >> > > Well the MBean has the same issue) Maybe the statistics should just be >> available through the ManagedRepositoryMBean .... But that would be a >> Jackrabbit issue ... >> >> Regards >> Felix >> >> >>> >>> Ian >>> >>> Sorry for being brief, from an iPad. >>> >>> On Monday, February 25, 2013, Felix Meschberger (JIRA) wrote: >>> >>>> >>>> [ >>>> >> https://issues.apache.org/jira/browse/SLING-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585727#comment-13585727 >> ] >>>> >>>> Felix Meschberger commented on SLING-2742: >>>> ------------------------------------------ >>>> >>>> I like the idea very much, but I am not comfortable with the patch: >>>> >>>> * I don't think we should expose the RepositoryStatistics as a service. >>>> These statistics pertain to a repository and should be related to the >>>> repository only, thus retrieved from the appropriate repository. >>>> * The MBean interface should define the MBean API for the benefit of JMX >>>> Management Agents. Otherwise the MBean is useless. Probably having the >>>> MBean just extend the Jackrabbit RepositoryStatistics would suffice it >> -- >>>> probably not, though, due to the non-JMX API used by >> RepositoryStatistics. >>>> * The MBean should probably be registered when the repository instance >> is >>>> registered as a service: Probably SlingServerRepository should overwrite >>>> the registerService and unregisterService methods to register/unregister >>>> the MBean service appropriately. This also makes the setup easier >> because >>>> there is no reflection required. >>>> >>>>> Expose RepositoryStatistics as a JMX Bean >>>>> ------------------------------------------ >>>>> >>>>> Key: SLING-2742 >>>>> URL: https://issues.apache.org/jira/browse/SLING-2742 >>>>> Project: Sling >>>>> Issue Type: Bug >>>>> Components: JCR >>>>> Affects Versions: JCR Jackrabbit Server 2.1.0 >>>>> Reporter: Ian Boston >>>>> Attachments: SLING-2742.patch >>>>> >>>>> >>>>> Jackrabbit comes with reasonably extensive stats which should be >> exposed >>>> via JMX for monitoring. Searching the current code base indicates that >> this >>>> has not been done already. >>>> >>>> -- >>>> This message is automatically generated by JIRA. >>>> If you think it was sent incorrectly, please contact your JIRA >>>> administrators >>>> For more information on JIRA, see: >> http://www.atlassian.com/software/jira >>>> >> >> >> -- >> Felix Meschberger | Principal Scientist | Adobe >> >> >> >> >> >> >> >> -- Felix Meschberger | Principal Scientist | Adobe
