IBM Tivoli Composite Application Manager for Application Diagnostics, Version 7.1.0.1

Customize Lock Analysis - J2EE Agent

Perform the following procedure enable lock analysis with customized settings:

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

  2. Modify the lockingClasses parameter in the lock_analysis.xml file.

    The parameter defines the classes for which lock requests will be Byte-Code-Instrumented. By default, all lock requests in all application classes are selected. By modifying this tag, you can implement a more granular selection, although within a class all lock requests are Byte-Code-Instrumented. Multiple lockingClasses tags can be specified.

    The lockingClasses tag 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 locking class name begins with an exclamation point (!), any classes matching the classes identified in the tag are specifically excluded from BCI for lock analysis. This is useful for indicating that all classes are to be Byte-Code-Instrumented except for those classes that are specifically excluded.

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

    • Only classes that begin with Cus or Sup should be Byte-Code-Instrumented for lock analysis.

    • The Supplier class should not be Byte-Code-Instrumented for lock analysis.

    The following would be the contents of the customized lock_analysis.xml file that accomplishes this:

       <aspect>
         <type>application</type>
         <name>com.ibm.tivoli.itcam.toolkit.ai.aspectj.apptrace.CaptureLock</name>
         <enabledProperty>
                 com.ibm.tivoli.itcam.toolkit.ai.enablelockanalysis</enabledProperty>
         <defaultEnabled>true</defaultEnabled>
         <lockingClass>com.mycompany.myapp.Cus*</lockingClass>
         <lockingClass>com.mycompany.myapp.Sup*</lockingClass>
         <lockingClass>!com.mycompany.myapp.Supplier</lockingClass>
      </aspect>

  3. Complete one of the following steps:

    • Save the file in 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.lock=DC_home/itcamdc/etc/lock_analysis.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.enablelockanalysis=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.lock=DC_home/itcamdc/etc/lock_analysis.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.enablelockanalysis=true

See the Monitoring on Demand chapter of the IBM Tivoli Composite Application Manager: User's Guide for a description of monitoring levels and information about how to manage monitoring levels.


Parent topic:

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

+

Search Tips   |   Advanced Search