Specifying Type Names for WebLogic Server MBeans and Custom MBeans Harvesting from the DomainRuntime MBeanServer When Configuration Settings Are Validated

7-4 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server specified by providing its name. The first character should be capitalized. For example, an attribute defined with getter method getFoo is named Foo. The harvested-attribute element also supports an expression syntax for drilling down into attributes that are complex or aggregate objects, such as lists, maps, simple POJOs Plain Old Java Objects, and various nestings of these types. See Section C.2, Specifying Complex and Nested Harvester Attributes, for details on this syntax. Note, however, that the result of these expressions must be a simple intrinsic type int, boolean, String, etc. in order to be harvested. ■ If no harvested-attribute is present, all harvestable attributes defined for the type are collected. ■ Attribute and instance lists can be combined in a type.

7.3.3 Specifying Type Names for WebLogic Server MBeans and Custom MBeans

The Harvester supports WebLogic Server MBeans and custom MBeans. WebLogic Server MBeans are those that come packaged as part of the WebLogic Server. Custom MBeans can be harvested as long as they are registered in the local runtime MBean server. There is a difference in how WebLogic Server and customer types are specified. For WebLogic Server types, the type name is the name of the Java interface that defines the MBean. For example, the server runtime MBeans type name is weblogic.management.runtime.ServerRuntimeMBean. For custom MBeans, the Harvester follows these rules: ■ If the MBean is not a ModelMBean, the type name is the implementing class name. For example, see Example 7–1 . ■ If the MBean is a ModelMBean, the type name is the value of the MBean Descriptor field DiagnosticTypeName. If neither of these conditions is satisfied if the MBean is a ModelMBean and there is no value for the MBean Descriptor field DiagnosticTypeName then the MBean cant be harvested.

7.3.4 Harvesting from the DomainRuntime MBeanServer

The harvested-type element supports a namespace attribute that lets you harvest metrics from MBeans registered in the DomainRuntime MBeanServer. Oracle recommends, however, that you limit the usage to harvesting only DomainRuntime-specific MBeans, such as the ServerLifeCycleRuntimeMBean. Harvesting of remote managed server MBeans through the DomainRuntime MBeanServer is possible, but is discouraged for performance reasons. It is a best practice to use the resident Harvester in each managed server to capture metrics related to that managed server instance. The namespace attribute can have one of two values: ■ ServerRuntime ■ DomainRuntime If the namespace attribute is omitted, it defaults to ServerRuntime. Configuring the Harvester for Metric Collection 7-5

7.3.5 When Configuration Settings Are Validated

WLDF attempts to validate configuration as soon as possible. Most configuration is validated at system startup and whenever a dynamic change is committed. However, due to limitations in JMX, custom MBeans cannot be validated until instances of those MBeans have been registered in the MBean server.

7.3.6 Sample Configurations for Different Harvestable Types