Using Execution Context ID (ECID) in Servicebus Projects

Execution Context ID (ECID) is a unique identifier to correlate events or requests associated with the same transaction across several Fusion Middleware components. The ECID value for a particular request is generated at the first layer and is passed down to the subsequent layers. The ECID value is logged (and auditable) in each product involved in the transaction. ECID allows an administrator to track the end-to-end flow of a particular request across the product stack.

In SOA Suite there exists XPath functions to retrieve the ECID. However such a function doesn’t exists for Servicebus. In this blogpost I describe how to get the ECID for a Servicebus project and how you can use the ECID to monitor and trace a Servicebus project.

Java Callout

Oracle WebLogic Server API provides a Java class to lookup the current ECID. The class DiagnosticContextHelper can be found in package weblogic.diagnostics.context. The integration of this API with Servicebus can be done by using a Java Callout. A Java

Callout in Servicebus requires a public final static function. Below you find the implementation used in our current project.

The screenshot afterwards shows how to call this function in a Servicebus project with a Java Callout.


In our projects we use the ECID as parameter in a Report activity. A Report typically used to document the start and the end of a message processing.


In the Report you can find the ECID for a particular request. The data written by a Report activity can be found in the Message Reports in Enterprise Manager.You can use the ECID to search for all Reports linked together with the ECID or to search in the log files for all messages associated with the ECID.



The ECID enables the monitoring and tracing over all involved components in Fusion Middleware. With the Java Callout the ECID can be obtained within a Servicebus project. Due to this the monitoring and tracing of Servicebus projects can be dramatically improved.