6.2.17. Hot Deploy Handler

This handler hot deploys the application during development.

By using this handler, changes to action class, form class, etc. can be updated immediately without restarting the application server. This saves the trouble of restarting the application server every time the source code is modified and allows the work to proceed efficiently.

The process flow is as follows.

../../../../_images/flow31.png

Important

Since this handler reloads the class for each request, it may lead to a decrease in response speed. for use in the development environment and should never be used in the production environment.

Important

When this handler is used, the request unit test may not operate normally. Therefore, do not use this handler during the request unit test.

Tip

When using this handler, disable the hot deploy function of the server.

6.2.17.2. Module list

<dependency>
  <groupId>com.nablarch.framework</groupId>
  <artifactId>nablarch-fw-web-hotdeploy</artifactId>
</dependency>

6.2.17.4. Specify the package to be hot-deployed

Packages to be hot-deployed are configured in the targetPackages property.

The configuration example is shown below.

<component class="nablarch.fw.hotdeploy.HotDeployHandler">
  <property name="targetPackages">
    <list>
      <value>please.change.me.web.action</value>
      <value>please.change.me.web.form</value>
    </list>
  </property>
</component>

Important

Entity classes should not be hot-deployed for the following reasons.

  • Since all the classes in the target package are reloaded for each request, the response speed may decrease if a class that does not change frequently, such as an entity class, is subject to hot deployment.
  • Since the class loader changes for each request, cast of entity class may fail when Session Store is used.