How WLDF Generates and Retrieves Data Mapping WLDF Components to Beans and Packages

16 Configuring and Using WLDF Programmatically 16-1 16 Configuring and Using WLDF Programmatically As discussed in previous chapters, you can use the WebLogic Server Administration Console to enable, configure, and monitor features of WebLogic Server, including the WebLogic Diagnostics Framework WLDF. You can do the same tasks programmatically using the JMX API and the WebLogic Scripting Tool WLST. The following sections provide information about configuring WLDF programmatically: ■ Section 16.1, How WLDF Generates and Retrieves Data ■ Section 16.2, Mapping WLDF Components to Beans and Packages ■ Section 16.3, Programming Tools ■ Section 16.4, WLDF Packages ■ Section 16.5, Programming WLDF: Examples In addition to the information provided in those sections, use the information in the following manuals to develop and deploy applications, and to use WLST: ■ Developing Applications for Oracle WebLogic Server ■ Developing Manageable Applications With JMX for Oracle WebLogic Server ■ Developing Custom Management Utilities With JMX for Oracle WebLogic Server ■ Deploying Applications to Oracle WebLogic Server ■ Oracle WebLogic Scripting Tool

16.1 How WLDF Generates and Retrieves Data

In general, diagnostic data is generated and retrieved by WLDF components following this process: ■ The WLDF XML descriptor file settings for the Harvester, Instrumentation, Image Capture, and Watch and Notification components determine the type and amount of diagnostic data generated while a server is running. ■ The diagnostic context and instrumentation settings filter and monitor this data as it flows through the system. Data is harvested, actions are triggered, events are generated, and configured notifications are sent. ■ The Archive component stores the data. ■ The Accessor component retrieves the data. 16-2 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server Configuration is primarily an administrative task, accomplished either through the Administration Console or through WLST scripts. Deployable descriptor modules, XML configuration files, are the primary method for configuring diagnostic resources at both the system level servers and clusters and at the application level. For information on configuring WLDF resources, see Chapter 4, Understanding WLDF Configuration. Output retrieval via the Accessor component can be either an administrative or a programmatic task.

16.2 Mapping WLDF Components to Beans and Packages

When you create WLDF resources using the Administration Console or WLST, WebLogic Server creates MBeans managed beans= for each resource. You can then access these MBeans using JMX or WLST. Because weblogic.WLST is a JMX client; any task you can perform using WLST you can also perform programmatically through JMX. Table 16–1 lists the beans and packages associated with WLDF and its components. Figure 16–1 groups the beans by type. Table 16–1 Mapping WLDF Components to Beans and Packages Component Beans Packages WLDF WLDFServerDiagnosticMBean WLDFSystemResourceMBean WLDFBean abstract WLDFResourceBean WLDFRuntimeMBean Diagnostic Image WLDFImageNotificationBean WLDFImageCreationTaskRuntimeMBean WLDFImageRuntimeMBean Instrumentation WLDFInstrumentationBean WLDFInstrumentationMonitorBean WLDFInstrumentationRuntimeMBean Diagnostic Context Package: weblogic.diagnostics.context DiagnosticContextHelper DiagnosticContextConstants Harvester WLDFHarvesterBean WLDFHarvestedTypeBean WLDFHarvesterRuntimeMBean Configuring and Using WLDF Programmatically 16-3 Watch Notification WLDFNotificationBean WLDFWatchNotificationBean WLDFJMSNotificationBean WLDFJMXNotificationBean WLDFSMTPNotificationBean WLDFSNMPNotificationBean WLDFWatchJMXNotificationRuntimeMBean WLDFWatchNotificationRuntimeMBean Package: weblogic.diagnostics.watch JMXWatchNotification WatchNotification Archive WLDFArchiveRuntimeMBean WLDFDbstoreArchiveRuntimeMBean WLDFFileArchiveRuntimeMBean WLDFWlstoreArchiveRuntimeMBean Accessor WLDFAccessRuntimeMBean WLDFDataAccessRuntimeMBean Table 16–1 Cont. Mapping WLDF Components to Beans and Packages Component Beans Packages 16-4 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server Figure 16–1 WLDF Configuration MBeans, Runtime MBeans, and System Module Beans

16.3 Programming Tools