Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14655

Invocations of ServiceMBeanSupport startService are not in dependency order

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 24.0.0.Beta1, 24.0.0.Final
    • None
    • JMX
    • None

      If jboss-service.xml adds two MBeans, A and B, with B declared to depend on A, the expectation is if those mbeans are instances of ServiceMBeanSupport then A.startService will be called before B.startService. But this doesn't always happen.

      ServiceMBeanSupport is deferring the invocation of startService until postRegister is called. ParsedServiceDeploymentProcessor and MBeanServices coordinate to install services that invoke ServiceMBeanSupport.create and start, and they set up dependencies so those invocations are ordered properly based on the depends elements in jboss-service.xml. But create and start don't actual end up invoking createService or startService. That's deferred until postRegister, and those postRegister calls are not ordered.

      A possible fix is to have MBeanServices also wire up dependencies for the MBeanRegistrationServices that end up triggering the call to postRegister.

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: