1
votes

Context: We are using MFP v6.3 on Tomcat (v7.0.57) running on a Linux system. We are attempting to use the MFP ANT tasks to automate the deployment of MFP artifacts (i.e. WAR file, adapters, and wlapps files). Specifically, we have a use case where we’d like to use the updateApplicationServer ANT task to update a WAR file that was initially deployed using the MFP’s configurationTool.sh.

Problem: The updateApplicationServer ANT task executes without any errors and we can see that the WAR file on the Tomcat server was indeed replaced with the new one. However, the new and updated Java code inside the WAR was not loaded by Tomcat/MFP. We noticed that after executing the updateApplicationServer ANT task, the contents of the WAR file was not exploded (even though the autodeploy and unpackWARs flags are set to true). Only after restarting the Tomcat server, the new code in the WAR can be used by the application. From the MFP documentation on the KnowledgeCenter, we were under the impression that a server restart would not be needed for the updateApplicationServer ANT task to update the corresponding WAR file. We were expecting the updateApplicationServer ANT task to update the WAR and make it available immediately for the MFP mobile app client.

Code: We are using Gradle to invoke the updateApplicationServer ANT task:

ant.updateApplicationServer(contextroot: contextRoot) {
    "project"(warfile: warFile)
    "applicationserver"() {
    "tomcat"(installdir: installDir)
  }
}
1

1 Answers

0
votes

The reason why updateApplicationServer requires a server restart in general (even for appservers that can stop and start an application while running) is that it also updates the worklight-jee-library.jar (this is useful to apply a fix pack).

Maybe you can try some tips listed at How do I update a Tomcat webapp without restarting the entire service? (such as dit tag as

 <Context reloadable="true">