DMS Architecture Overview Oracle Fusion Middleware Online Documentation Library

6-10 Oracle Fusion Middleware Performance and Tuning Guide For more information on using WLDF to harvest and monitor MBean data see Oracle Fusion Middleware Configuring and Using the Diagnostics Framework for Oracle WebLogic Server.

6.6 DMS Execution Context

The DMS execution context is the mechanism by which requests such as HTTP or RMI requests can be uniquely identified and thus tracked as they flow through the system. It also provides a means by which context information can be communicated between cooperating Fusion Middleware components involved in fulfilling requests.

6.6.1 DMS Execution Requests and Sub-Tasks

The DMS execution context has been developed with the understanding that a single request or task may form the root of a tree of sub-tasks that are coordinated to complete the request or root task. Consider the following examples of requests and their associated sub-tasks:

1. An HTTP request sent directly to Oracle WebLogic Server from a browser:

■ Root task only on Oracle WebLogic Server

2. An HTTP request sent through Oracle HTTP Server acting as a reverse proxy to

Oracle WebLogic Server: ■ Root task on Oracle HTTP Server ■ Single sub-task on Oracle WebLogic Server

3. An HTTP request sent from Oracle HTTP Server acting as a reverse proxy to

Oracle WebLogic Server that then requires invocation of two remote web services from Oracle WebLogic Server in order to fulfill the request: ■ Root task on Oracle HTTP Server ■ Single sub-task on Oracle WebLogic Server ■ Two sub-sub-tasks, one on each web service A DMS execution context is composed of the following: ■ A unique identifier, the ECID The Execution Context ID ECID is unique for each new root task and is shared across the tree of tasks associated with the root task. ■ A relationship identifier, the RID The Relationship ID RID is an ordered set of numbers that describes the location of each task in the tree of tasks. The leading number is usually a zero. A leading number of 1 indicates that it has not been possible to track the location of the sub-task within the overall sub-task tree. ■ A set of name-value pairs by which globally relevant data can be shared among Oracle Fusion Middleware components. The following three scenarios illustrate how ECID and RID are used when an HTTP request is sent from Oracle HTTP Server acting as a reverse proxy to an Oracle WebLogic Server and the server requires invocation of two remote web services from Oracle WebLogic Server. 1. Root task on Oracle HTTP Server: – New ECID = B5C094FA...BE4AE8 Oracle Dynamic Monitoring Service 6-11 – Root RID = 0 2. Single sub-task on Oracle WebLogic Server: – Same ECID = B5C094FA...BE4AE8 – Sub-task RID = 0:1 3. Two Sub-tasks, one on each web service: – First web service invoked Same ECID = B5C094FA...BE4AE8 Sub-task RID = 0:1:1 – Second web service invoked Same ECID = B5C094FA...BE4AE8 Sub-task RID = 0:1:2

6.6.2 DMS Execution Context Usage

The most immediate benefits of the DMS execution context are realized when attempting to correlate log messages between servers. The Oracle standard format for logging involves a field dedicated to the ECID. Once the ECID is known, when its read from an ERROR level log message for example, it is possible to locate all other log messages associated with that task by querying the log files for messages containing that ECID. The following example shows a very specific case of using the command: displayLogsecid=B5C094FA...BE4AE8; In this example, any log files with messages that contain the ECID B5C094FA...BE4AE8 will be displayed.

6.6.3 DMS Execution Context Communication

Figure 6–2 shows the components that cooperate in order to communicate the DMS execution context between each other. Arrows pointing to a component indicate the protocols that are inspected for incoming context information. Outgoing arrows show protocols to which context information is added. It is possible for a single component to send requests to itself, passing context information in that request.