IBM Tivoli Composite Application Manager for Application Diagnostics, Version 7.1.0.1

Customize L3 Method Entry and Exit Analysis - J2EE Agent

To enable L3 method entry and exit analysis with customized settings:

  1. Make a copy of the DC_home/itcamdc/etc/method_entry_exit.xml file, and open it up in a text editor.

  2. Modify the parameters in the method_entry_exit.xml file. The following table describes the parameters you can modify:


    Parameters for L3 Method Entry and Exit Analysis Configuration File

    Tag Name Description
    methodSelection Defines the classes and methods to be modified. By default, all classes and methods are selected. By modifying the className and methodName tags within the methodSelection tag, you can implement a more granular selection. Each methodSelection tag must contain exactly one className tag, and one or more methodName tags. Multiple methodSelection tags can be specified.
    className Name of a class or classes to be modified. Each methodSelection tag must contain exactly one className tag.
    methodName Identifies a method or method within the class or classes identified by the className tag to be modified for entry/exit tracing. Each methodSelection tag must contain one or more methodName tags.

    Both the className and the methodName tags can include wildcard characters. The following summary describes how the wildcard characters work:

    • Asterisk (*) stands for zero or more occurrences of any character when used by itself. When embedded within a sequence of characters (for example, java.*.String), it matches zero or more occurrences of any character except the package separator (.).

    • Two periods (..) can be used to specify all sub-packages (for example, java..String matches java.lang.String). It matches any sequence of characters that starts and ends with the package separator (.).

    • If the method name begins with an exclamation point (!), any methods that match the method name are specifically excluded from BCI for entry and exit tracing. This is useful for indicating that all methods within a class or group of classes are to be Byte-Code-Instrumented except for those methods that are specifically excluded.

    For example, an application with a package name of com.mycompany.myapp has the following requirements:

    • Within the Customer class, all methods should be Byte-Code-Instrumented.

    • Within the Supplier class, all methods should be Byte-Code-Instrumented except for those methods beginning with the get or set.

    The following example shows the contents of the customized method_entry_exit.xml file that accomplishes this:

      <aspect>
        <type>application</type>
        <name>com.ibm.tivoli.itcam.toolkit.ai.aspectj.apptrace.EntryExitAspect</name>
        <enabledProperty>
               com.ibm.tivoli.itcam.toolkit.ai.methodentryexittrace</enabledProperty>
         <defaultEnabled>true</defaultEnabled>
         <methodSelection>
              <className>com.mycompany.myapp.Customer</className>
              <methodName>*</methodName>
         </methodSelection>
         <methodSelection>
              <className>com.mycompany.myapp.Supplier</className>
              <methodName>!get*</methodName>
              <methodName>!set*</methodName>
         </methodSelection>
      </aspect>

  3. Complete one of the following steps:

    • Save the file in the custom_directory, then complete the following steps:

      1. In the custom_directory/toolkit_custom.properties file, uncomment the following line by removing the number sign (#) at the beginning of the line:
        am.camtoolkit.gpe.customxml.L3=DC_home/itcamdc/etc/method_entry_exit.xml

      2. Change this line by replacing the path with just the file name of the file you modified in Step 2.

      3. Set the following property to true:
        com.ibm.tivoli.itcam.toolkit.ai.methodentryexittrace=true

    • Save the file in any directory on your server, then complete the following steps:

      1. In the custom_directory/toolkit_custom.properties file, uncomment the following line by removing the number sign (#) at the beginning of the line:
        am.camtoolkit.gpe.customxml.L3=DC_home/itcamdc/etc/method_entry_exit.xml

      2. Change this line by specifying the path and name for the file you modified in Step 2.

      3. Set the following property to true:
        com.ibm.tivoli.itcam.toolkit.ai.methodentryexittrace=true


Parent topic:

Control Instrumentation of Application Classes for Memory Leak, Lock and L3 Method Analysis