Page History
...
This instrumenter configuration file causes instrumentation to be applied to the start and stop(boolean) methods of abstract and concrete classes that extend the AbstractTask class.
<?xml version='1.0'?>
<instrumenter-config>
<custom-config>
<java-classes>
<java-class>
<class-name> xmp.wfm.task.AbstractTask </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:• The
- The matched class extends the interface that is specified in the <class-name> element.
...
- The name of the method matches the name that is specified in the <name> element.
...
- The method signature matches the types that are specified using the <param> elements.
...
- The method was declared in the matching class.
Based on these rules, custom-type instrumentation is applied to the following methods:• AbstractTask
AbstractTask.start()
...
AbstractTask.start(
...
TaskContent)
...
AbstractTask.stop(boolean)
...
RecoverableTaskAdapter.start()
...
RecoverableTaskAdapter.start(
...
TaskContent)
...
RecoverableTaskAdapter.stop(boolean)
However, instrumentation is not applied to the following methods:• AbstractTask
AbstractTask.stop()
because the method does not match the specified signature of (boolean).
...
RecoverableTaskAdapter.recover(RecoverableTaskContext)
because the method was not declared in the AbstractTask class.
...
RecoverableTaskAdapter.stop()
because the method does not match the specified signature of (boolean) See About method signature matching.
About extending instrumentation to classes matching a wildcard
...
This instrumenter configuration file causes instrumentation to be applied to the start() and stop() methods of abstract and concrete classes that extend the AbstractTask class. See About using the wildcard character *.
<?xml version='1.0'?>
<instrumenter-config>
<custom-config>
<java-classes>
<java-class>
<class-name> xmp.wfm.task.AbstractTask </class-name>
<methods>
<method>
<name> s* </name>
<params> <params/>
</method>
</methods>
</java-class>
</java-classes>
</custom-config>
</instrumenter-config>
When wildcards are used in the <name> element and the matching construct is a class, instrumentation is applied to methods of abstract and concrete classes that satisfy the following criteria:• The
- The name of the method matches the wildcard pattern that is specified in the <name> element.
...
- If the <params> element is present, the signature of the method matches the signature that is specified in the <params> element. Specifying empty <params> </params> indicates that methods with zero arguments are matched, as in a signature of ( ). If <params> </params> is omitted, all signatures are matched.
...
- The method is declared in the matched class.
Based on these rules, custom-type instrumentation is applied to the following methods:• AbstractTask
AbstractTask.start()
...
AbstractTask.start(
...
TaskContent)
...
AbstractTask.stop()
...
RecoverableTaskAdapter.start()
...
RecoverableTaskAdapter.start(
...
TaskContent)
...
RecoverableTaskAdapter.stop()
However, instrumentation is not applied to the following methods:• AbstractTask
AbstractTask.stop(boolean)
because the method does not match the specified signature of ().
...
RecoverableTaskAdapter.recover(RecoverableTaskContext)
because the method name does not match the wildcard pattern.
...
RecoverableTaskAdapter.stop(boolean)
because the method does not match the specified signature of ().
About extending instrumentation to methods that are declared in extending classes
...
This instrumenter configuration file causes instrumentation to be applied to the start methods of abstract and concrete classes that extend the AbstractTask class or a class that extends the AbstractTask class.
<?xml version='1.0'?>
<instrumenter-config>
<custom-config>
<java-classes>
<java-class>
<class-name> xmp.wfm.task.AbstractTask </class-name>
<methods>
<method>
<name> sta* </name>
...
<apply-to-subtypes>true</apply-to-subtypes>
</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 name of the method matches the wildcard pattern that is specified in the <name> element.
...
- The signature of the method matches the signature that is specified in the <params> element (if present).
...
- The method is declared in the matched class.
...
- The matched class is the same as or extends the class specified in the <class-name> element.
Based on these rules, custom-type instrumentation is applied to the following methods:• AbstractTask
AbstractTask.start()
...
AbstractTask.start(
...
TaskContent)
...
RecoverableTaskAdapter.start()
...
RecoverableTaskAdapter.start(
...
RecoverableTaskContent)
However, instrumentation is not applied to the following methods:• AbstractTask
AbstractTask.stop()
because the method does not match the specified wildcard pattern of sta*.
...
AbstractTask.stop(boolean)
because the method does not match the specified wildcard pattern of sta*.
...
RecoverableTaskAdapter.recover(RecoverableTaskContext)
because the method does not match the specified wildcard pattern of sta*.
...
RecoverableTaskAdapter.stop()
because the method does not match the specified wildcard pattern of sta*.
...
RecoverableTaskAdapter.stop(boolean)
because the method does not match the specified wildcard pattern of sta*.
About instrumenting using annotations
...
This instrumenter configuration file causes instrumentation to be applied to the start and stop methods of abstract and concrete classes that extend a class or implement an interface that is annotated with the TransactionProvider annotation.
<?xml version='1.0'?>
<instrumenter-config>
<custom-config>
<java-classes>
<java-class>
<class-name> * </class-name>
<annotation-name> xmp.wfm.task.TransactionProvider </annotation-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 fill the following criteria:• The
- The matched class extends a class that is
...
- annotated with the annotation specified in the <annotation-name> element.
...
- The name of the method matches the name that is specified in the <name> element.
Based on these rules, custom-type instrumentation is applied to the following methods:• AbstractTask
AbstractTask.start
...
AbstractTask.stop
...
RecoverableTaskAdapter.start
...
RecoverableTaskAdapter.stop
About instrumenting annotated methods
...
This instrumenter configuration file causes instrumentation to be applied to all methods in the application that are annotated with @Transaction:
<?xml version='1.0'?>
<instrumenter-config>
<custom-config>
<java-classes>
<java-class>
<class-name> * </class-name>
<methods>
<method>
<name> * </name>
<annotation-name> xmp.wfm.task.Transaction</annotation-name>
</method>
</methods>
</java-class>
</java-classes>
</custom-config>
</instrumenter-config>
Instrumentation is applied to methods that fll fill the following criteria:• The
- The method is annotated with
@Transaction
Based on these rules, custom-type instrumentation is applied to the following methods:• AbstractTask
AbstractTask.start
About instrumenting annotated methods in implementing or inheriting classes
...
This instrumenter configuration file causes instrumentation to be applied to all methods in the application that are annotated with @Transaction, and to implementing and overriding methods:
<?xml version='1.0'?>
<instrumenter-config>
<custom-config>
<java-classes>
<java-class>
...
<class-name> * </class-name>
<methods>
<method>
<name> * </name>
<annotation-name> xmp.wfm.task.Transaction</annotation-name>
<apply-to-subtypes>true</apply-to-subtypes>
</method>
</methods>
</java-class>
</java-classes>
</custom-config>
</instrumenter-config>
Instrumentation is applied to methods that fill the following criteria:• The
- The method is annotated with
@Transaction
...
- Or - the method implements an interface method that is annotated with
@Transaction
...
- Or - the method overrides a method that is annotated with
@Transaction
Based on these rules, custom-type instrumentation is applied to the following methods:• AbstractTask
AbstractTask.start
...
RecoverableTaskAdapter.start
About instrumenting only classes that are not assignable to a class or interface
...
This instrumenter configuration file causes instrumentation to be applied to all the classes in the xmp.wfm.task package, except for the ones that are assignable to RecoverableTask:
<?xml version='1.0'?>
<instrumenter-config>
<custom-config>
<java-classes>
<java-class>
<class-name> xmp.wfm.task.* </class-name>
<not-assignable-to> xmp.wfm.task.RecoverableTask </not-assignable-to>
<methods>
<method>
<name> start </name>
</method>
</methods>
</java-class>
</java-classes>
</custom-config>
</instrumenter-config>
Instrumentation is applied to methods that satisfy the following criteria:• The
- The class is in the package
xmp.wfm.task
...
- The class is not assignable to
xmp.wfm.task.RecoverableTask
Based on these rules, custom-type instrumentation is applied to the following methods:• AbstractTask
AbstractTask.start
About instrumenting all calls from a method
Instrumentation can be applied to all calls from methods that match criteria specified in a <java-classes> element. This instrumenter configuration file causes instrumentation to be applied to all calls from the methods that match the <java-classes> element.
<?xml version='1.0'?>
<instrumenter-config>
<all-calls-from-method>
<java-classes> ]
...
</java-classes>
</all-calls-from-method>
</instrumenter-config>
The rules that apply to the <java-classes> element that is documented in preceding sections are applied when it is used inside the <all-calls-from-method> element.
...