14.5.7 Hot deployment and dynamic reloading
Hot deployment and dynamic reloading characterize how application updates are handled when updates to the applications are made by directly manipulating the files on the server. In either case, updates do not require a server restart, though they might require an application restart:
- Hot deployment of new components Hot deployment of new components is the process of adding new components, such as WAR files, EJB JAR files, EJBs, servlets, and JSP files to a running appserver without having to stop and then restart the appserver.
However, in most cases, such changes require the application itself to be restarted, so that the appserver run time reloads the application and its changes.
- Dynamic reloading of existing components Dynamic reloading of existing components is the ability to change an existing component without the need to restart the appserver for the change to take effect. Dynamic reloading can involve changes to the:
Implementation of an application component, such as changing the implementation of a servlet
Settings of the application, such as changing the deployment descriptor for a Web module
To edit the files manually, locate the binaries in use by the server. See Repository files used for application execution. Although the application files can be manually edited on one or more of the nodes, these changes will be overwritten the next time the node synchronizes its configuration with the deployment manager. Therefore, we recommend that manual editing of an application's files should only be performed in the master repository, located on the deployment manager machine.
Unless you are familiar with updating applications by directly manipulating the server files, it might be better to use the console Update wizard.
There are three settings that affect dynamic reload:
- Reload classes when application files are updated In order for application files to be reloaded automatically after an update, Reload classes when application files are updated must be enabled and the Polling interval for updated files must be greater than 0.
Select Applications | Enterprise Applications, and click the link for the application. In the Detail properties section, click the Class loading and update detection link.
- Application Server class loader policy The appserver's class loader policy should be set to Multiple. If it is set to Single, the appserver will need to be restarted after an application update.
Select Servers | Application Servers, and click the Server link. The setting is found in the General Properties section.
- JSP Reload options for Web modules A Web container reloads a Web module only when this setting is enabled.
Select Applications | Enterprise Applications, and click the link for the application. In the Web Module Properties section, click the JSP reload options for web modules link, and then select the JSP enable class reloading option and enter a polling interval.
For more information about using hot deployment and dynamic reload, see the Updating applications and Hot deployment and dynamic reloading topics in the Information Center.