Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This instrumenter configuration file causes instrumentation to be applied to the start and stop methods of abstract and concrete classes that implement the Task interface.

<?xml version='1.0'?>
<instrumenter-config>
     <custom-config>
          <java-classes>
               <java-class>
                    <class-name> xmp.wfm.task.Task </class-name>
               <methods>
                    <method>
                         <name> start </name>
                    </method>
                    <method>
                         <name> stop </name>
                    </method>
               </methods>
               </java-class>
          </java-classes>
     </custom-config>
</instrumenter-config>

Instrumentation is applied to methods of abstract and concrete classes that satisfy the following criteria:•    The

  • The matched class implements, directly or indirectly, the interface that is specified in the <class-name> element.

...

  • The name of the method matches the name that is specified in one of the <name> elements.

...

  • The method, including signature, was declared in the matching interface.

Based on these rules, custom-type instrumentation are applied to the following methods:•    AbstractTask

  • AbstractTask.start()

...

  • AbstractTask.stop()

...

  • AbstractTask.stop(boolean)

...

  • RecoverableTaskAdapter.start()

...

  • RecoverableTaskAdapter.stop()

...

  • RecoverableTaskAdapter.stop(boolean)

However, instrumentation is not applied to the following methods:•    AbstractTask

  • AbstractTask.start(TaskContext) because the method was not declared in the Task interface.

...

  • RecoverableTaskAdapter.start(TaskContext) because the method was not declared in the Taskinterface.

...

  • RecoverableTaskAdapter.recover(RecoverableTaskContext) because the method was not declared in the Task interface.
About restricting instrumentation to methods that match a signature

The <params> element can be included within a <method> element to restrict instrumentation to a method that is based on a signature. See “About About method signature matching” on page 218matching.

This instrumenter configuration file causes instrumentation to be applied to the start and stop(boolean) methods of abstract and concrete classes that implement the Task interface.

<?xml version='1.0'?>
<instrumenter-config>
     <custom-config>
          <java-classes>
               <java-class>
                    <class-name> xmp.wfm.task.Task </class-name>
                    <methods>
                         <method>
                              <name> start </name>
                         </method>
                         <method>
                              <name> stop </name>
                              <params>
                                   <param> boolean </param>
                              </params>
                         </method>
                    </methods>
               </java-class>
          </java-classes>
     </custom-config>
</instrumenter-config>

Instrumentation is applied to methods of abstract and concrete classes that satisfy the following criteria:

...

•    RecoverableTaskAdapter.stop() because the method does not match the specified signature of (boolean) See “About About method signature matching” on page 218matching.

About extending instrumentation to interfaces matching a wildcard

...

•    RecoverableTaskAdapter.stop() because the method does not match the specified signature of (boolean) See “About About method signature matching” on page 218matching.

About extending instrumentation to classes matching a wildcard

...

</calls-from-method-to-method>

See “About About method signature matching” on page 218matching.

About ignore instrumentation configuration

...

</java-class>

</java-classes>

See “About About method signature matching” on page 218matching.

For each method to be instrumented, the following rules are used to determine if instrumentation should not be applied to the method:

...

</invocation-relationship>

See “About About method signature matching” on page 218matching.

For each call to a method to be instrumented, the following rules are used to determine if instrumentation should not be applied to the method:

...

</invocation-relationship>

See “About About method signature matching” on page 218matching.

The <name> element must represent a fully qualified method name. The portion of the <name> element after the last dot (“.”) is considered to be the method name, and the portion of the <name> element before the last dot is considered to be the class name. When you use wildcards, it is important to use a wildcard pattern that fits the scheme described. For example, the wildcards pattern *.* matches all methods of all classes.

...

Common instrumenter configuration matching techniques are method signature matching and using the wildcard character *.

Anchor
AboutMethodSigMatching
AboutMethodSigMatching
About method signature matching

The <params> element configures rules that are used to match method signatures for processing by the instrumenter. The <params> element has the following structure:

...