Configuring threshold monitoring for components

You can configure response-time monitoring for EJB, CORBA, PowerBuilder, and Web components.

For components, threshold monitoring requires a thread monitor with a hard thread limit. When the response-time threshold is reached, subsequent calls to the component must acquire the thread monitor before proceeding. After the average response time drops below the threshold, new invocations are allowed to proceed normally. To define a thread monitor, follow the instructions in “Monitoring threads” in Chapter 3, “Creating and Configuring Servers,” in the System Administration Guide. Set the thread limit to a low number, for example 10. You can also define the thread monitor in an Ant configuration file, for example:

<project name="MyThreadMonitor">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties threadMonitor="MyThreadMonitor">
      <property name="maximumActiveThreads" value="10"/>
    </setProperties>
  </target>
</project>

After you have defined a thread monitor, threshold monitoring can be applied with the <performanceMonitor> Ant command run inside the <setProperties> task. For example:

<setProperties component="ejb.components.myjar.MyCompRemote">
  <performanceMonitor maxResponseTime="5000" threadMonitor="MyMonitor"/>
</setProperties>

The maxResponseTime value specifies the maximum allowed response time in milliseconds. The threadMonitor value specifies the thread monitor that must be acquired by new requests when the average response time exceeds the maximum. The component value specifies the name of the DJC component that runs the application component that you want to monitor. Set this depending on the application component type, as follows: