1 Reply Latest reply on May 15, 2009 5:47 PM by ips

    KnownComponentTypes usage

    starksm64

      I'm thinking current request to expand the MCBean and MBean component subtypes to include some of the recent additions is heading in the wrong direction. For example:

       /**
       * An enum of additional MBean:* ManagedComponent types not defined in {@link KnownComponentTypes}.
       */
       public enum MBean
       {
       Platform,
       Servlet,
       Web,
       WebApplication,
       WebApplicationManager,
       WebHost,
       WebRequestProcessor,
       WebThreadPool;
      
       public String type()
       {
       return this.getClass().getSimpleName();
       }
      
       public String subtype()
       {
       return this.name();
       }
      
       public ComponentType getType()
       {
       return new ComponentType(type(), subtype());
       }
       }
      
       /**
       * An enum of additional MCBean:* ManagedComponent types not defined in {@link KnownComponentTypes}.
       */
       public enum MCBean
       {
       JTA,
       MCServer,
       Security,
       ServerConfig,
       ServerInfo,
       ServicebindingManager,
       ServicebindingMetadata,
       ServiceBindingSet,
       ServiceBindingStore;
      
       public String type()
       {
       return this.getClass().getSimpleName();
       }
      
       public String subtype()
       {
       return this.name();
       }
      
       public ComponentType getType()
       {
       return new ComponentType(type(), subtype());
       }
       }
      


      The issue is that whether or not these are MCBeans or MBeans is largely an irrelevant implementation detail. I'm thinking that we should be classifying these more like the datasource, jms destinations.

      I'm not going to change the component types we are currently using this late in the release. Rather, I'm thinking of adding support for multiple component types similar to the alias notion.


        • 1. Re: KnownComponentTypes usage
          ips

          I was thinking the same thing.

          The only reason it might be useful to know a component was mapped from an MBean is because then you'd know the component name is the same as the corresponding MBean's ObjectName. But in either case, in order to do intelligent queries for components of a certain type, clients will need to know the exact format of the component name, not just that it's an ObjectName.

          So I agree.

          For the Web-related components, maybe use something like:

          Web:Application
           Web:ApplicationManager
           Web:Host
           Web:RequestProcessor
           Web:ThreadPool


          rather than:

          MBean:WebApplication
           MBean:WebApplicationManager
           MBean:WebHost
           MBean:WebRequestProcessor
           MBean:WebThreadPool