Perform hot deployments

This topic describes how to perform “hot” deployments with Deploy. Hot deployment is the practice of updating an application without restarting infrastructure or middleware components.

This approach is based on the technology being able to accommodate updates without restarting. Example: Red Hat JBoss Application Server (AS) implements this functionality by scanning a directory for changes and automatically deploying any changes that it detects.

By default, the JBoss AS plugin for Deploy restarts the target server when a deployment is performed. You can change this behavior by preventing the restart and specifying the hot deploy directory as a target.

This sample section of a synthetic.xml file makes the restartRequired property available and assigns the /home/deployer/install-files directory to the targetDirectory property for the jbossas.EarModule configuration item (CI) type:

<type-modification type="jbossas.EarModule">
  <!-- make it visible so that I can control whether to restart a Server or not from UI-->
  <property name="restartRequired" kind="boolean" default="true" hidden="false"/>

  <!-- custom deploy directory for my jboss applications -->
  <property name="targetDirectory" default="/home/deployer/install-files" hidden="true"/>

For more information, see Extending the JBoss Application Server plugin.