Resetting the System Clock Can Affect How Data Is Archived and Retrieved Deploying a Diagnostic Module as an Application-Scoped Resource

13-8 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server } Getter for property serverUrl. return Value of property serverUrl. public java.lang.String getServerUrl { return serverUrl; } Setter for property serverUrl. param serverUrl New value of property serverUrl. public void setServerUrljava.lang.String serverUrl { this.serverUrl = serverUrl; } protected String serverName = null; protected String username = null; protected String password = null; protected String queryString = ; private String serverUrl = t3:localhost:7001; private String accessorType = null; private long endTime = Long.MAX_VALUE; private long beginTime = 0; private WLDFAccessRuntimeMBean dar = null; }

13.5 Resetting the System Clock Can Affect How Data Is Archived and Retrieved

Resetting the system clock to an earlier time while diagnostic data is being written to the WLDF Archive or logs can cause unexpected results when you query that data based on a timestamp. For example, consider the following sequence of events: 1. At 2:00 p.m., a diagnostic event is archived as RECORD_200, with a timestamp of 2:00:00 PM. 2. At 2:30 p.m., a diagnostic event is archived as RECORD_230, with a timestamp of 2:30:00 PM. 3. At 3:00 p.m., the system clock is reset to 2:00 p.m. 4. At 2:15 p.m. after the clock was reset, a diagnostic event is archived as RECORD_ 215, with a timestamp of 2:15:00 PM. 5. You issue a query to retrieve records generated between 2:00 and 2:20 p.m. The query will not retrieve RECORD_215, because the 2:30:00 PM timestamp of RECORD_230 ends the query. 14 Deploying WLDF Application Modules 14-1 14 Deploying WLDF Application Modules The only WebLogic Diagnostics Framework WLDF component you can use with applications is Instrumentation. See Section 11.5, Configuring Application-Scoped Instrumentation. You configure and manage instrumentation for an application as a diagnostics application module, which is an application-scoped resource. The configuration is persisted in a descriptor file which you deploy with the application. A diagnostic module deployed in this way is available only to the enclosing application. Using application-scoped resources ensures that an application always has access to required resources and simplifies the process of deploying the application to new environments. You can deploy an application using a deployment plan, which permits dynamic configuration updates. The following sections describe how to deploy WLDF application modules: ■ Section 14.1, Deploying a Diagnostic Module as an Application-Scoped Resource ■ Section 14.2, Using Deployment Plans to Dynamically Control Instrumentation Configuration ■ Section 14.3, Using a Deployment Plan: Overview ■ Section 14.4, Creating a Deployment Plan Using weblogic.PlanGenerator ■ Section 14.5, Sample Deployment Plan for Diagnostics ■ Section 14.6, Enabling Hot-Swap Capabilities ■ Section 14.7, Deploying an Application with a Deployment Plan ■ Section 14.8, Updating an Application with a Modified Plan

14.1 Deploying a Diagnostic Module as an Application-Scoped Resource

To deploy a diagnostic module as an application-scoped resource, you configure the module in a descriptor file named weblogic-diagnostics.xml. You then package the Note: For instrumentation to be available for an application, instrumentation must be enabled on the server to which the application is deployed. Server-scoped instrumentation is enabled and disabled in the instrumentation element of the diagnostics descriptor for the server. 14-2 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server descriptor file with the application archive in the ARCHIVE_PATHMETA-INF directory for the deployed application. For example: D:\bea\wlserver_ 10.3\samples\server\medrec\dist\standalone\exploded\medrec\META-INF\weblogic-diagn ostics.xml You can deploy the diagnostic module in both exploded and unexploded archives. You can use any of the standard WebLogic Server tools provided for controlling deployment, including the WebLogic Administrative Console or the WebLogic Scripting Tool WLST. For information on creating modules and deploying applications, see Deploying Applications to Oracle WebLogic Server. Because of the different ways that diagnostic application modules and diagnostic system modules are deployed, there are some differences in how you can reconfigure them and when those changes take place, as shown in Table 14–2 . The details of how to work with diagnostic application modules is described throughout this section. See Chapter 11, Configuring Instrumentation, for information about working with diagnostic system modules.

14.2 Using Deployment Plans to Dynamically Control Instrumentation Configuration