Thread monitors

Thread monitors provide a means to limit the execution time devoted to specified components and component methods. You can assign components and methods to a thread monitor to ensure that no more than a specified maximum number of threads will be active at any point executing the methods and components assigned to the monitor.

You can also use thread monitors without a limit on the number of threads. Doing so allows you to use the monitor trace properties to record performance data.

Thread monitors are not active for component calls that use the lightweight container (see “Lightweight container”).

NoteAlternatives to thread monitors As an alternative to configuring thread monitors to govern component load, you can configure response-time threshold monitoring for your application components or network listeners. For more information, see Chapter 9, “Using the Performance Monitor.”

To create or configure a thread monitor, follow the instructions in Thread monitor properties in the EAServer System Administration Guide.

StepsAssigning a component or method to a thread monitor

  1. Display the properties for the component or method, then display the Advanced tab.

  2. For a component, if the com.sybase.jaguar.component.monitor property is not present, add it. Otherwise modify this property. Set the value to the name of the thread monitor.

    For a method, if the com.sybase.jaguar.method.monitor property is not present, add it. Otherwise modify this property. Set the value to the name of the thread monitor.

  3. Regenerate and recompile the component skeleton.