Controlling dynamic updates
Three types of dynamic update can be controlled through configuration: changing the
server configuration; adding and removing applications; updating installed applications. For all deployed applications, you can configure whether application monitoring is enabled and how often to check for updates to applications. For the dropins
directory, you can also configure the name and location of the directory and choose whether to deploy the applications that are in the directory.
About this task
By default, deployed applications are monitored for updates, and the updates are dynamically
applied to the running application. This applies both to applications that are deployed through
configuration entries, and those deployed from the dropins
directory. You can change these
default behaviors by setting the config and
applicationMonitor elements in the server.xml
configuration
file. You can use a text editor to do this, or you can use the developer tools and select
Configuration Admin Service or Application Monitor in
the server configuration design view.
See also the descriptions of the config and applicationMonitor elements in Enterprise JavaBeans Lite 3.1, Liberty Kernel, Java Servlets 3.0, and OSGi Blueprint.
<applicationMonitor updateTrigger="polled" pollingRate="500ms"
dropins="dropins" dropinsEnabled="true"/>
The default settings for
configuration monitoring are as
follows:<config updateTrigger="polled" monitorInterval="500ms"/>
- The updateTrigger property has three possible values:
- polled
- The runtime environment scans the
server.xml
file for changes by using the timing interval that is specified by the monitorInterval property. - mbean
- The runtime environment looks for updates only when it is prompted to do so through a call to an
MBean. This mode is used by the developer tools to update the
server.xml
file, unless you override it. The provided FileNotificationMBean MBean can be called to trigger an application update. - disabled
- The updates are not dynamically applied.
- When you specify the pollingRate property or the
monitorInterval property, you include the unit of time after the number:
ms
(milliseconds)s
(seconds)m
(minutes)h
(hours)
- The dropins property specifies the name of the directory that is used as
the
dropins
directory. - The dropinsEnabled property is a boolean property that determines whether
the applications in the
dropins
directory are deployed.