Network Deployment (Distributed operating systems), v8.0 > Troubleshoot and support > Work with Diagnostic Providers > Create a Diagnostic Provider


Implement a Diagnostic Provider

To use a Diagnostic Provider configure an MBean with the methods and attributes required to handle the data from the application server and client applications.

This task presumes that we have a programming knowledge of the creation of MBeans. For more information about the interaction of MBeans with WAS, refer to the creating and registering standard, dynamic, and open custom MBeans information. The steps that follow outline a general process for implementing a Diagnostic Provider (DP).


Procedure

  1. Modify the MBean descriptor XML. To implement a Diagnostic Provider, have an MBean, and the MBean should include this statement in its descriptor XML as a direct child of the MBean element:
    <parentType type="DiagnosticProvider"/> 
    This defines the operations, attributes, and aggregators necessary for an MBean to be a Diagnostic Provider. If you do not need to have this DP exist in z/OS Controllers, then this XML inclusion handles all z/OS specifics for your MBean.
  2. Modify the MBean Implementation. Your MBean should already have a class which instantiates it and registers it with the Java Management Extensions (JMX) server.

    The first difference here is that define a property in the Properties class that is passed to the registration (and becomes part of the ObjectName). The property is diagnosticProvider=true and it can be added with a line of code such as:

     MyProps.setProperty(DiagnosticProvider.DIAGNOSTIC_PROVIDER_KEY, DiagnosticProvider.DIAGNOSTIC_PROVIDER_VALUE) ;
    

    The second difference is that this class should register this Diagnostic Provider with the Diagnostic Service. A helper method is available to do this:

     DiagnosticProviderHelper.registerMBeanWithDiagnosticService(DiagnosticProviderPName, DiagnosticProviderId) ;
    
    Obviously this must be done after the registration when the ObjectName can be retrieved into the DiagnosticProviderId string.
  3. Implement the Diagnostic Provider methods.


Related


Diagnostic Provider method implementation
Create and registering standard, dynamic, and open custom MBeans

+

Search Tips   |   Advanced Search