2 Replies Latest reply on Aug 2, 2007 12:33 PM by Scott Stark

    Exposing management operations

    Scott Stark Master

      while its straightforward to express the properties that correspond to managed properties from the deployment attachment, its not so for the managed operations. Take the case of the datasource root managed object attachment. This contains the properties, but the operations need to be bound to an mbean whose name is not know until deployment time. It seems like there needs to be a ManagementOperation annotation that can be used to describe a reference to an operation that will be resolved during deployment processing. Something like:

       operations={@ManagementOperation(target="TheDSPool", name="flush", signature={})}
      public class DSMetaData implements Serializable
       @ManagementProperty(name="display-name", use={})
       public String getDiplayName()

      I'm not sure how to integrate this into the mc processing. There is also the issue of how to map the "TheDSPool" alias onto the actual mbean name for the DeploymentUnit this metadata is associated with.

      What are others thoughts on how to associate the managed operations with the ManagedObject?

        • 1. Re: Exposing management operations
          Mark Spritzler Apprentice

          Not that I have any brilliant ideas (I steal them anyway), but it seems you need.

          1. The definition of the Operations by what type of managed object it is, this will need to be referenced by the Managed Object Type. This is going to be needed to define not only the operation name, but also if it takes any parameters, and also if it returns any values.

          2. So the actual Managed Object instance will have a reference to the Managed Object Type to get to the definitions.

          I can easily be overlooking something here.

          Wouldn't the Managed Object have the mbean name, so if there was say one method that invokes any operation, you pass the operation definition and the Managed object (with the MBean Name) to that method that would fire it off. Is there any other pieces of information that would also be needed?

          • 2. Re: Exposing management operations
            Scott Stark Master

            This in addition to the other issue of resolving properties that reference other ManagedObjects seems to need a registry for both name and operation resolution as these are related to runtime components rather than static metadata structures.