Versions Compared

Key

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

...

This instrumenter configuration file causes instrumentation to be applied to all calls made to println printIn methods in the java.io. package or to run () methods.

<?xml version='1.0'?>
<instrumenter-config>
     <all-calls-to-method>
          <methods>
               <method>
                    <name> java.io.*.println </name>
               </method>
               <method>
                    <name> *.run </name>
                    <params> <params/>
               </method>
          </methods>
     </all-calls-to-method>
</instrumenter-config>

The <name> element has a different interpretation from its use in all other cases. When the <name> element is used inside an <all-calls-to-method> element, it must represent a fully-qualified method name. The portion of the <name> after the last dot (“.”) is considered to be the method name, and the portion of the <name> 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 wildcard pattern *.set* matches all methods whose name starts with set of all classes, and xmp.task.*.* matches all methods in all classes whose name starts with xmp.task.

...

This instrumenter configuration file causes instrumentation to be applied to all calls made to println methods in the java.io. package or to run() methods from methods in abstract or concrete classes that implement the AbstractTask interface.

<?xml version='1.0'?>
<instrumenter-config>
     <invocation-relationship>
          <java-class>
               <class-name> xmp.task.AbstractTask </class-name>
          </java-class>
          <invoked-method> java.io.*.println </invoked-method>
          <invoked-method> *.run() </invoked-method>
     </invocation-relationship>
</instrumenter-config>

The rules that apply to the <java-class> element that is documented in preceding sections are applied when it is used inside the <invocation-relationship> element.

...

The <invoked-method> may also include a method signature. The method signature should follow these rules:•    The

  • The method signature must be enclosed in parentheses (“(“) and (“)”).

...

  • The method signature must not contain spaces.

...

  • A comma (“,”) must separate parameter types in the method signature.

...

  • The method signature may include wildcards.

About preventing instrumentation for classes, methods, and calls to methods

...

This instrumenter configuration file prevents instrumentation from being applied to the AbstractTask class:

<?xml version='1.0'?>
<instrumenter-config>
     <custom-config>
          <java-classes>
               <java-class>
                    <class-name> xmp.wfm.* </class-name>
                    <methods>
                         <method>
                              <name> * </name>
                         </method>
                    </methods>
               </java-class>
          </java-classes>
     </custom-config> ]
     <ignore-config>
          <java-classes>
               <java-class>
                    <class-name> xmp.wfm.task.* </class-name>
               </java-class>
          </java-classes>
     </ignore-config>
</instrumenter-config>

Based on these rules, instrumentation is not applied to the following methods:•    AbstractTask

  • AbstractTask.start()

...

  • AbstractTask.start(TaskContext)

...

  • AbstractTask.stop()

...

  • AbstractTask.stop(boolean)

However, instrumentation is still applied to the following methods:•    RecoverableTaskAdapter

  • RecoverableTaskAdapter.start()

...

  • RecoverableTaskAdapter.stop()

...

  • RecoverableTaskAdapter.stop(boolean)
About preventing instrumentation for methods of a class

...

This instrumenter configuration file prevents instrumentation from being applied to 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> * </name>
                         </method>
                    </methods>
               </java-class>
          </java-classes>
     </custom-config>
     <ignore-config>
          <java-classes>
               <java-class>
                    <class-name> xmp.wfm.task.AbstractTask </class-name>
               </java-class>
          </java-classes>
     </ignore-config>
</instrumenter-config>

Based on this configuration, instrumentation is not applied to the following methods:

...