IBM Tivoli Composite Application Manager for Application Diagnostics, Version 7.1.0.1

Create custom requests

To create a custom request:

  1. Edit the DC_home/runtime/app_server_version.node_name.server_name/custom/toolkit_custom.properties file and uncomment the following line:
    am.camtoolkit.gpe.customxml.custom=/opt/IBM/itcam/WebSphere/DC/itcamdc
              /etc/custom_requests.xml
    You can specify a different location and file name.

    If the custom_request.xml file resides in the DC_home/runtime/app_server_version.node_name.server_home/custom/ directory, then you can simply specify the simple file name, without having to specify the fully qualified path.

  2. Create or edit the custom_requests.xml - it is typically easier to make a copy of the file and edit it to add the custom request definitions. The following example shows an XML specification for a custom request:
    <gpe>
      <bci>
        <customEdgeRequests>
    
          <edgeRequest>
             <requestName>MonteCarlo</requestName>
                   <Matches>com.myco.investment.modeler.Simulator</Matches>
                   <type>application</type>
             <methodName>executeMonteCarlo</methodName>
           </edgeRequest>    
              
         </customEdgeRequests>       
      </bci>
    </gpe> 
    The following table explains the XML elements in the custom_requests.xml file.


    XML elements in custom_requests.xml

    Tag Name Description
    edgeRequest One or more application methods that are to be monitored for custom request processing. By modifying the requestName, Matches, type, and methodName tags within the edgeRequest tag, you can customize the selection. Each edgeRequest tag must contain exactly one methodName tag, and one or more Matches tags. Multiple edgeRequest tags can be specified.
    requestName Unique name for this request. The request name appears in the L1 or L2 trace entry that is produced when one of the methods identified by this custom request runs.
    Matches Class or classes containing methods to be defined as custom requests. Multiple Matches tags can be present within a single edgeRequest tag.
    type Indicates whether the classes specified are loaded by system or application class loader. If the classes are present within an application EAR file, then the type is “application”. However, in rare cases, the classes might be present in JAR files specified in ws.ext.dir, system classpath or even in bootstrap classpath. In such cases the type is “system”.
    methodName Names of the methods within one of the classes identified by the Matches tag that are to be monitored for custom request processing. One methodName tag can be specified in each edgeRequest tag.

    The Matches and the methodName tags can include wildcard characters. The following list is a summary of the wildcard functionality:

    • 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 (.).

  3. After defining the custom requests, the application server JVM needs to be recycled for them to take effect.


Parent topic:

Custom requests

+

Search Tips   |   Advanced Search