3 Replies Latest reply on Mar 23, 2009 8:58 AM by ips

    JBAS-6647, templates

    starksm64

      I'm not sure what your looking for in terms of MBean.Platform templates. These should not have templates as you cannot create a deployment of platform mbeans.

        • 1. Re: JBAS-6647, templates
          ips

          You can ignore that comment. It was meant for https://jira.jboss.org/jira/browse/JBAS-6646; I mistakenly added it to https://jira.jboss.org/jira/browse/JBAS-6647 instead.

          Here is a relevant comment from JBAS-6647 that I would like to hear your thoughts on:

          I think it may make more sense to key the templates off of the ManagedComponent type names, rather than having separate template names, i.e.:

          ManagementView.getTemplate(ComponentType componentType)

          rather than:

          ManagementView.getTemplate(String templateName)

          Or if we need to support having multiple templates per component type, perhaps the notion of a default template and a new getDefaultTemplate() method could be added, i.e.:

          ManagementView.getDefaultTemplate(ComponentType componentType)

          If we had either of these APIs, we wouldn't have to maintain a ProfileService template name for each RHQ ResourceType in the jboss-as-5 plugin descriptor.

          • 2. Re: JBAS-6647, templates
            starksm64

            You would need both as there can be many different suppliers of a given ComponentType (DataSources are one example) that could have significantly different templates. I know we setup a compile time view of each component type in the console layer, but we need the flexibility to have a template keyed by a name.

            If we were to provide a lookup by ComponentType, I suppose we would have to add a notion of the preferred template so the template registration layer, or just provide a name to ComponentType mapping as part of the ManagementView bean configuration. The latter is the better approach. So I will add a feature request for the ManagementView.getDefaultTemplate(ComponentType componentType) api.

            • 3. Re: JBAS-6647, templates
              ips

              The way we do it in the RHQ configuration API is each configurable entity can have an arbitrary # of uniquely named templates, but the template with the name "default" is the default template, which is used in certain use cases where the client just wants a template to use to create an entity of that type and doesn't care or know about any other template that may exist.

              API-wise, we provide both a getTemplate(String name) API and a getDefaultTemplate() API, which is actually just a shortcut for getTemplate("default").

              http://svn.rhq-project.org/repos/rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationDefinition.java