Configuring custom plug-ins deployed on the Agent Controller

Custom plug-ins can be deployed on the Agent Controller and run on remote hosts. The plug-ins are installed in the plugin directory Agent Controller install directory. Each plug-in will have its own pluginconfig.xml specifying the execution environment and the application environment settings in which the plug-in should run.

Configuring the execution environment

The execution environment for custom plug-ins should contain a custom class path definition. This will ensure that only the required jar files for the custom plug-in are run. To customize the execution environment:

  1. Locate the pluginconfig.xml configuration file for the custom plug-in. This is usually located in the Agent Controller install directory, under /plugin/<custom_plugin>/ where custom_plugin is the name of the plug-in directory.
  2. Open it in an editor, and search for the <AgentControllerEnvironment> element. If this element does not exist, create the element.
  3. Add the sub-element <Variable>. Specify the value of the name attribute in the format CLASSPATH_<org>_<myapp> where org_myapp is the plug-in directory name with the dot '.' replaced with an underscore '_'. Specify the value position attribute as 'append'. Specify the value attribute as the jar file in the custom plug-in directory. The following is an example of the customized <AgentControllerEnvironment> element:
    <AgentControllerEnvironment configuration="default">
      <Variable name="CLASSPATH_ORG_MYAPP" position="append" value="%PLUGINS_HOME%/org.myapp/one.jar"/>
      <Variable name="CLASSPATH_ORG_MYAPP" position="append" value="%PLUGINS_HOME%/org.myapp/two.jar"/>
      <Variable name="CLASSPATH_ORG_MYAPP" position="append" value="%PLUGINS_HOME%/org.myapp/three.jar"/>
    </AgentControllerEnvironment>
    
    
  4. Save the changes.
  5. Re-start the Agent Controller.

    Note: Any number of <Variable> elements can be added to the environment.  The rules are processed on a first-come, first-serve basis.

Configuring the application environment

The application environment for a plug-in is defined within the <Application> element in the pluginconfig.xml file. These settings in this element are visible only to the application. You can also configure your application to use jar files from other applications deployed on the Agent Controller using the <Application> element. To configure the application environment:

  1. Locate the pluginconfig.xml configuration file for the custom plug-in. This is usually located in the Agent Controller install directory, under /plugin/<custom_plugin>/ where custom_plugin is the name of the plug-in directory.
  2. Open it in an editor, and search for the <Application> element. The element should be defined as follows:
    <Application configuration="default" executable="myapp2" location="%SYS_TEMP_DIR%" path="%JAVA_PATH%">
    </Application>
    
    where
  3. To configure your application to use jar files from other applications, add the sub-element Variable. Specify the value of the name attribute as CLASSPATH. Specify the value position attribute as the execution environment Specify the value attribute as the plug-in directory of the other application that that you want to use. The following is an example of a pluginconfig.xml for myapp2 that uses jar files from another execution environment called org.myapp.
    <?xml version="1.0" encoding="UTF-8"?>
    <PluginConfiguration>
      <Application configuration="default" executable="myapp2" location="%SYS_TEMP_DIR%" path="%JAVA_PATH%">
        <Variable name="CLASSPATH" position="append" value="%CLASSPATH_ORG_MYAPP%"/>
      </Application>
      <Option name="my.proj2" type="version" value="1.0.0"/>
    </PluginConfiguration>
    
  4. Save changes.
  5. Re-start the Agent Controller.

Related tasks
Locating the configuration files
Administering the Agent Controller
 


(C) Copyright IBM Corporation 2000, 2006. All Rights Reserved.