Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6797

HASingletonController doesn't work as an MBean because of dependency issues

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.1.2 ER1
    • EAP_EWP 5.1.0
    • Clustering
    • None
    • Hide

      Deploy an HASingletonController as an MBean, that is deployed before ClusterPartition is completely started.

      <mbean code="org.jboss.ha.singleton.HASingletonController"
      name="test:name=HASingletonController">
      <depends optional-attribute-name="ClusterPartition"
      proxy-type="attribute">jboss:service=HAPartition,partition=${jboss.partition.name:DefaultPartition}</depends>
      <depends optional-attribute-name="TargetName">test:service=SomeService</depends>
      <attribute name="TargetStartMethod">startSingleton</attribute>
      <attribute name="TargetStopMethod">stopSingleton</attribute>
      </mbean>

      Expected result: the <depends> waits for ClusterPartition service to be available before calling it.
      Actual result: deployment fails because it calls ClusterPartition before it is available.

      Show
      Deploy an HASingletonController as an MBean, that is deployed before ClusterPartition is completely started. <mbean code="org.jboss.ha.singleton.HASingletonController" name="test:name=HASingletonController"> <depends optional-attribute-name="ClusterPartition" proxy-type="attribute">jboss:service=HAPartition,partition=${jboss.partition.name:DefaultPartition}</depends> <depends optional-attribute-name="TargetName">test:service=SomeService</depends> <attribute name="TargetStartMethod">startSingleton</attribute> <attribute name="TargetStopMethod">stopSingleton</attribute> </mbean> Expected result: the <depends> waits for ClusterPartition service to be available before calling it. Actual result: deployment fails because it calls ClusterPartition before it is available.
    • Release Notes
    • Workaround Exists
    • Hide

      Use HASingletonController as a POJO (see Administration Guide).

      Show
      Use HASingletonController as a POJO (see Administration Guide).
    • Hide
      The deployment of a HASingletonController as an MBean could fail if the MBean upon which it depended had not yet been started. To fix this issue the availability of dependent MBeans is first checked before deployment, resulting in reliable deployments of HASingletonController.
      Show
      The deployment of a HASingletonController as an MBean could fail if the MBean upon which it depended had not yet been started. To fix this issue the availability of dependent MBeans is first checked before deployment, resulting in reliable deployments of HASingletonController.
    • Documented as Resolved Issue
    • NEW

    Description

      When using HASingletonController as an MBean, it errors out during deployment if the ClusterPartition MBean is not already fully deployed.

      This is due to changes in org.jboss.ha.jmx.AbstractHAServiceMBeanSupport#setClusterPartition
      to make it work as a POJO.
      > ------------------------------------------------------------------------
      > r76670 | pferraro | 2008-08-05 11:17:01 -0500 (Tue, 05 Aug 2008) | 2 lines
      >
      > Refactored HASingletonSupport into pojo + mbean wrapper.
      > Simplified responsibility of HASingletonElectionPolicy.
      > ------------------------------------------------------------------------

      setClusterPartition now calls "clusterPartition.getHAPartition()", which is incorrect because
      the dependencies have not been checked yet and ClusterPartition may not exist yet.
      This call should be moved back to startService, at which point the dependencies have been checked.

      Attachments

        Activity

          People

            rhn-support-dereed Dennis Reed
            rhn-support-dereed Dennis Reed
            Russell Dickenson Russell Dickenson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: