Agent Startup and Shutdown
At the top of rwagent.xml are settings for three properties:
the path to the default logging configuration file, typically
RWSF_CONF\loggers.xmla shutdown key representing the message to send to the Agent to cause it to shut down
a shutdown port, the location to send the shutdown message
These properties are followed by a set of elements for defining code to run at Agent startup and shutdown. These elements are hooks to modify the startup and shutdown behavior of the agent. This is what that configuration may look like:
<rwsf:methods>
<rwsf:preStartup>
<!--
<rwsf:method name="load-named-objects"
class="rwsf_agent_methods.createNamedObjectLoader">
<rwsf:property name="rwsf:objects-file"
value="${RWSF_CONF}/objects.xml"/>
</rwsf:method>
-->
</rwsf:preStartup>
<rwsf:postStartup>
</rwsf:postStartup>
<rwsf:preShutdown>
</rwsf:preShutdown>
<rwsf:postShutdown>
<rwsf:method name="destroy-named-objects"
class="rwsf_agent_methods.createNamedObjectCleanup"/>
</rwsf:postShutdown>
</rwsf:methods>
For any given element, the methods are initialized in the order they appear in the configuration file and are executed in the order they appear within each element. The time of execution for the methods within an element is as follows:
preStartup: executed immediately after the
methods end tag is parsed during startup
postStartup: executed after all components have been initialized, and after the connectors have been started
preShutdown: executed at shutdown before any of the normal Agent runtime components shut down
postShutdown: executed at shutdown after all of the normal Agent runtime components have shut down
If you wish to use named objects, you will need to uncomment the rwsf:methods element named load-namedobjects, and update the rwsf:objects-file property to point to your named objects definition file. In the code above, the file is objects.xml in the main conf directory.