Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-9183

Expose QueryStatManagerMBean for monitoring

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Neutral Neutral
    • 6.3.0
    • None
    • core
    • Yes
    • Yes
    • Yes

      Jackrabbit provides the org.apache.jackrabbit.api.jmx.QueryStatManagerMBean exposing information about queries and its performance. We should register it either with the MBean server info.magnolia.cms.util.MBeanUtil#registerMBean or Dropwizard metrics (info.magnolia.monitoring.MicrometerRegistryProvider).

      Discovery

      • The QueryStatManagerMBean is exposed by org.apache.jackrabbit.stats.jmx.QueryStatManager, which needs a org.apache.jackrabbit.api.stats.QueryStat instance. The latter is available via the org.apache.jackrabbit.core.RepositoryContext, which is an internal class that is only available when creating the repository via org.apache.jackrabbit.core.RepositoryContext#create.
      • ProviderImpl currently allocated the Repository instance through a call to org.apache.jackrabbit.core.jndi.RegistryHelper#registerRepository. The latter internally uses org.apache.jackrabbit.core.jndi.BindableRepositoryFactory to create a  org.apache.jackrabbit.core.jndi.BindableRepository but does not offer extension points for creating a custom Repository instance.
      • To customize repository allocation we need to copy and modify org.apache.jackrabbit.core.jndi.RegistryHelper and org.apache.jackrabbit.core.jndi.BindableRepositoryFactory for the latter to create our own {{org.apache.jackrabbit.core.jndi.BindableMgnlRepository}} that exposes the RepositoryContext.
      • See this PR for the details described above.

        Acceptance criteria

              mduerig Michael Duerig
              mduerig Michael Duerig
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Work Started:

                  Task DoD