+

Search Tips   |   Advanced Search

Control dynamic updates

There are three types of dynamic update that can be controlled through configuration: changing the server configuration; adding and removing applications; updating installed applications. For deployed applications, we can configure whether application monitoring is enabled and how often to check for updates to applications. For the "dropins" directory, configure name and location, and choose whether to deploy applications in the directory.

By default, deployed applications are monitored for updates, and the updates are dynamically applied to the running application. This applies both to applications deployed through configuration entries, and those deployed from the "dropins" directory. To change default behavior, set the config and applicationMonitor elements in server.xml. We can use a text editor, or we can use the developer tools and select Configuration Admin Service or Application Monitor in the server configuration design view.

See Configuration elements in server.xml.

The default settings for application monitoring :

The updateTrigger property has three possible values:

For pollingRate, include the unit of time after the number:

The dropins property specifies the name of the directory used as the "dropins" directory.

The dropinsEnabled property is a boolean property that determines whether the applications in the "dropins" directory are deployed.

Configure dynamic changes to the server configuration.

Changes to server.xml, or any files it includes, are detected by the runtime environment and applied to the active configuration. We can disable this behavior by setting the config element in server.xml:

Configure dynamic addition and removal of applications.

As described in Deploy applications to the Liberty profile, applications can be dynamically added to and removed from the server runtime environment through two mechanisms:

Configure dynamic updates to installed applications.

By default, if we add, remove or modify any files within a deployed application, or you replace the whole application with an updated version, the previous version is automatically stopped and the new version is started. This process applies for any deployed application, whether the application is in the "dropins" directory or at a location defined in server.xml. We can control this behavior by setting the applicationMonitor element in server.xml. For example, to disable dynamic update of all applications, create an entry as follows:

Configure the name and location of the "dropins" directory.

By default, the "dropins" directory is ${server.config.dir}/dropins. We can change this by setting the applicationMonitor element in server.xml. For the location, we can use any known variable, or a property in bootstrap.properties, or an absolute path, or a path relative to the server directory. For example, both the following settings point to the same location:

<applicationMonitor dropins="${server.config.dir}/applications" /> <applicationMonitor dropins="applications" />

For web service applications, if the service client and service provider are not in the same application and the WSDL file in the service provider application is changed, we need to restart the web service client application manually to avoid the WSDL definition cache issue.


Parent topic: Administer the Liberty profile manually

Tasks:
Add and run an application on the Liberty profile using developer tools
Deploy applications to the Liberty profile
Directory locations
Configuration elements in server.xml