Reloading an Agent during Iterative Development

When agent metadata and static resources change during the development cycle, you can reload the agent to the server.

When you register an agent, the server requests and caches the agent's metadata and static resources. This information is likely to change during iterative development. Instead of unregistering the agent and then re-registering it, it is faster and more convenient to reload the agent, which caches the new information in the server.

Prerequisites

Development mode must be enabled for the server.

The agent must already be registered. The server must have connected to the agent at least once, before modification.

Four metadata items are integral to the agent. Reloading does not update these items. (If you change any of these items, then you must unregister and re-register the agent.)
  • type name (For stand-alone agents, this is the name argument to the TeaAgentServer constructor. For servlet agents, this is the agentName argument to the TeaAgentServlet.autoRegisterAgent method.)
  • version (For stand-alone agents, this is the version argument to the TeaAgentServer constructor. For servlet agents, this is an init-param in the agent's web.xml file.
  • agent ID (This is a unique ID, which the agent code may set.)
  • product ID (This is the type name of the top level object.)

Reloading does not update role and permission metadata. (If you change roles or permissions, then you must unregister and re-register the agent.)

Procedure

  1. Restart the agent.
    That is, after modifying the agent code, stop the old agent, and start the modified agent.
  2. Navigate to the Agent Management page of the server GUI.
  3. Select the agent to reload.
  4. Click the Reload operation button.