Uploaded image for project: 'appNG'
  1. appNG
  2. APPNG-2044

Provide a possibility to reload a site triggered by a marker file

    XMLWordPrintable

    Details

    • Type: Feature
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.15.0
    • Component/s: appng-core
    • Labels:

      Description

      Concept:

      • If a site property supportReloadFile is true, a watcher Thread is started
      • this Thread waits for a file named .reload to appear in the site's root directory
      • if found, a site reload is performed
      • when done, the file is renamed to something else (e.g. append the unix time) for historical reasons

      This feature is especially useful for development scenarios in conjunction with the local profile.
      Here, an ant <touch> can be used to create this file:

      <profile>
      	<id>local</id>
      	<properties>
      		<outFolder>${env.CATALINA_HOME}/webapps/ROOT/applications/</outFolder>
      		<site>manager</site>
      	</properties>
      	<build>
      		<plugins>
      			<plugin>
      				<artifactId>maven-assembly-plugin</artifactId>
      				<configuration>
      					<descriptorRefs>
      						<descriptorRef>assembly-local</descriptorRef>
      					</descriptorRefs>
      					<finalName>${project.artifactId}</finalName>
      				</configuration>
      			</plugin>
      			<plugin>
      				<artifactId>maven-antrun-plugin</artifactId>
      				<version>1.8</version>
      				<executions>
      					<execution>
      						<goals>
      							<goal>run</goal>
      						</goals>
      						<phase>package</phase>
      						<configuration>
      							<target>
      								<touch file="${env.CATALINA_HOME}/webapps/ROOT/repository/${site}/.reload" />
      							</target>
      						</configuration>
      					</execution>
      				</executions>
      			</plugin>
      		</plugins>
      	</build>
      </profile>

      The main advantage here is that there is no messaging needed.
      In a local development environment, usually there is no need to configure messaging.

      It would also be possible to let appNGizer create this file (in case no messaging is available), which means the appNGizer maven plugin would also benefit from this feature.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mueller.matthias Matthias Müller
                Reporter:
                mueller.matthias Matthias Müller
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: