Certain property keys in the J2EE agent AMAgent.properties configuration file are hot-swap enabled. The value for these keys, when altered, are dynamically loaded by the agent such that it is not necessary to restart the deployment container for these changes to take effect. However, in cases where the property is explicitly identified as not enabled for hot-swap or in cases when the hot-swap mechanism is disabled on the system, the deployment container must be restarted for the changes to take effect.
When the agent is deployed on a deployment container where Access Manager has been configured, the hot-swap mechanism is disabled by default and cannot be used.
The hot-swap mechanism is controlled by the following configuration property:
The valid values for this property is any unsigned integer including 0, which indicates the amount of time in seconds after which the agent will check for changes to the configuration. A setting of 0 disables the mechanism. By default, this mechanism is set to 0 and is, therefore, disabled.
This mechanism is primarily provided to facilitate the development and testing of your application in a controlled development or test environment. It is strongly recommended that this feature be disabled for production systems to ensure optimal utilization of system resources. Also, in a production system by disabling this feature, any accidental changes to the agent configuration will not take effect until the deployment container has been restarted.
The property that controls the hot-swap mechanism itself is hot-swap enabled. This means that if the hot-swap mechanism is enabled and you change the value of this property, the new value will take effect after the last hot-swap load interval expires. This can be therefore used to dynamically disable the entire hot-swap system. For example consider the following situation:
The deployment container is started with the load interval set to 10 seconds. Therefore, changes made to the agent configuration are picked up by the agent every 10 seconds.
If you modify the load interval value while the deployment container is running and set it to 0, when the last load interval completes, the agent will pick up this new value. Since the value is set to 0 the agent will disable the hot-swap mechanism for the entire system.
Once disabled, the configuration changes made in the J2EE agent AMAgent.properties configuration file will not be sensed by the agent. Therefore, even if you reset the value of this property now to any other number, it will not enable the hot-swap mechanism unless the deployment container is restarted.
When the value of the load interval is set to 0 during the startup of the deployment container, the hot-swap mechanism will be disabled and cannot be enabled without restarting the server and ensuring that this value is set to a value greater than 0.