Configuring the SSP to use a custom resource allocation manager

You can customize the scenario suite resource allocation policy manager and then repackage the SSP to change the resource allocation behavior.

About this task

A default scenario suite resource allocation policy implementation is provided. If you want to customize this behavior and configure the SSP to use this custom policy, perform the following steps:

Procedure

  1. Create a custom implementation of the IlrSSPResourceAllocationPolicyManager interface. This interface defines a single method that is called by the SSP for each scenario suite execution request it receives. The method returns an IlrSSPResourceAllocationPolicy object that defines the resource allocation for the scenario suite. The policy manager can also reject the execution of the scenario suite by throwing an IlrRejectedScenarioSuiteExecutionException. You can assign execution properties to the IlrSSPResourceAllocationPolicyManager implementation using the IlrScenarioSuiteDescriptor, or use the information provided by the SSP context on the running scenario suites to assign a priority to a new thread.
  2. Package the custom implementation in the SSP. The XOM repackaging features can be used to do this, using a JAR containing the custom implementation instead of a simple XOM JAR. For more information, see Repackaging the SSP file using the ssp-setup Ant task.
  3. Reference the custom implementation in the SSP web.xml deployment descriptor. Uncomment the <init-param> of the descriptor, and add the fully qualified name of the custom implementation as the value of the CUSTOM_RESOURCE_ALLOCATION_POLICY_MANAGER parameter.

    The example below shows the descriptor with the value of my.ScenarioSuiteResourceAllocationPolicyManager:

    <!-- Uncomment the following section if you plan to use a custom scenario suite
         resource allocation policy manager, and enter the fully qualified name of
         your custom implementation as the param-value. 
    --> 
         <init-param>
            <description>The custom scenario suite resource allocation policy manager
                         to use.</description>
            <param-name>CUSTOM_RESOURCE_ALLOCATION_POLICY_MANAGER</param-name>
            <param-value>my.ScenarioSuiteResourceAllocationPolicyManager</param-value>
         </init-param>	     
  4. Set up the work managers for the different priority values on WebSphere® Application Server and update the SSP deployment descriptor to reference the work manager names in the <res-ref-name> elements. In other application servers and Java™ SE, set the JRULES_JOBS_POOL_SIZE parameter to the required value.
  5. Run the test suite or simulation in the Decision Center Enterprise console.