+

Search Tips   |   Advanced Search

Install enterprise application files by adding properties files to a monitored directory

Use application properties files to...

Drag or copy a properties file to a monitored directory and the product performs the deployment action described in the properties file. The enterprise application files that we can install, update, or uninstall using properties files include...

An enterprise application file must conform to the Java EE specification.

See Global Deployment Settings.

Develop and assemble the EAR, JAR, WAR, or SAR file. Use a supported assembly tool such as an IBM Rational Application Developer for WebSphere Software product to specify bindings and assemble the file.

Unlike the procedure described in Installing enterprise application files by adding them to a monitored directory, which does not change existing JNDI and other application bindings, we can set bindings in a properties file.

By default, monitored directory deployment is not enabled. Before we can use monitored directory deployment, enable it. See Set monitored directory deployment values.

Restriction: Installing an EAR, JAR, WAR, or SAR file by adding a properties file to a monitored directory is available only on distributed or z/OS operating systems. It is not supported on IBM i operating systems.

We can deploy an EAR, JAR, WAR, or SAR file to an application server or cluster by dragging or copying an application properties file to...

The product scans a monitored directory for new properties files no more frequently than every 5 seconds, by default. After finding a new properties file in a monitored directory, the product automatically runs...

...installs the application or module on the application server or cluster, and starts the application or module.

We do not need to start wsadmin or enter any commands to deploy the application or module. Simply add a properties file to a monitored directory. The product runs wsadmin applyConfigProperties for you.

We can also use a properties file to update or delete a deployed application or module. The server or cluster must be running so that the product can detect changes to files in its monitored directory.

The steps assume that we use a graphical file browser to drag or copy the properties file. Alternatively, we can use operating system commands to copy a file into directory...


Install enterprise application files by adding properties files to a monitored directory

  1. Create a properties file that defines the deployment task we want to complete.

    The examples at the end provide sample application properties files for use in monitored directories.

    The properties files used in monitored directories are like the properties files described in the topic about using application properties files to install, update, and delete enterprise application files. However, properties files used for monitored directories differ slightly:

    • We do not need to specify statements in the header such as...

        CreateDeleteCommandProperties=true

    • To uninstall an enterprise application, we specify DELETE=true in the header of the properties section.

    Only specify application resource type operations...

      ImplementingResourceType=Application

    If the properties file contains a non-application resource type such as ImplementingResourceType=Server, the product will return an error message and not perform the operation on the resource type.

    Use an edited properties file to install or update an application. To extract the properties file of a deployed enterprise application to edit or use as a template, run the extractConfigProperties command:

    • Extract application properties to a file that uses the old application output format.

        AdminTask.extractConfigProperties('[-propertiesFileName myApp.props -configData Deployment=MyApplication]')

      Running this Jython example produces a file named myApp.props that lists the properties of an Application configuration object named MyApplication. By default, the extractConfigProperties command produces output that displays all columns, including hidden and non-hidden columns, of install task and task data values in separate rows. The mutables row shows which columns we can edit (true) and which we cannot edit (false).

        ...
        taskName=MapModulesToServers
          mutables={false false true false false false} #readonly
          row0={module uri server ModuleVersion moduletype moduletypeDisplay} # readonly
        ...
        

      This format is shown in the example Install an enterprise application with various task options using the old application output format.

    • Extract application properties to a file that uses the simple output format.

        AdminTask.extractConfigProperties('[-propertiesFileName myApp.props -configData Deployment=MyApplication -options [[SimpleOutputFormat true]]]')

      Running this Jython example with the SimpleOutputFormat option set to true produces a file named myApp.props that lists the properties of an Application configuration object named MyApplication in an easier to read format. The output displays non-hidden columns of application properties in columnName=value pairs. Hidden columns of application properties are not included in the output.

        ...
        taskName=MapModulesToServers
        row0={ module="My EJB Module"  #readonly
               uri=MyEjbModule.jar,META-INF/ejb-jar.xml  #readonly
               server=WebSphere:cell=!{cellName},node=!{nodeName},
               server=!{serverName} }
        ...
        

      This format is shown in the example Install an enterprise application with various task options using the simple output format

    For more information about extracting application properties and the output formats, see the topic on using application properties files to install, update, and delete enterprise application files.

  2. Ensure that the application server or cluster member on which we want to install the enterprise application file is running.

  3. Ensure that monitored directory deployment is enabled.

  4. Open a file browser and create the deploymentProperties monitored directory.

    For base (stand-alone) application servers, the monitored directory is under the application server profile. After creating the deploymentProperties directory, the directory path is...

      app_server_root/profiles/application_server_profile/monitoredDeployableApps/deploymentProperties

    For application servers on a managed (federated) node of a deployment manager, create the deploymentProperties monitored directory under the deployment manager profile. After creating the deploymentProperties directory, the directory path is...

      app_server_root/profiles/dmgr_profile/monitoredDeployableApps/deploymentProperties

    For clusters, create a deploymentProperties monitored directory under the deployment manager profile. After creating the deploymentProperties directory, the directory path is...

      app_server_root/profiles/dmgr_profile/monitoredDeployableApps/deploymentProperties

  5. Copy the properties file to the deploymentProperties monitored directory.

The product adds a directory having the same name as the file to the installedApps/cell directory of the profile.

Also, the product writes messages about the application deployment to the SystemOut.log file in the app_server_root/logs/server directory. The messages start with the CWLDD message key.

The messages indicate that the product deployed the application file and that the application is running.

IBM recommends using the High Performance Extensible Logging (HPEL) log and trace infrastructure . We view HPEL log and trace information using the logViewer .

For installations on a deployment manager monitored directory, the product does not start an application or module automatically if the node agent or server is not running. If a node agent is stopped, the product installs the application or module at the deployment manager level, but does not synchronize the changes with the node and does not start the application or module. The changes will occur at the node the next time the agent is running and a node synchronization occurs. If the server is stopped but the node agent is running, the product installs the application or module and synchronizes the changes with the node, but does not start the server.

Install an enterprise application on a deployment target

Property Description
Name Name of application to install.
TargetServer Name of server on which application to be installed
TargetNode Name of node on which application to install
EarFileLocation Location of the enterprise archive (EAR file). Provide a fully qualified path name.


Install an enterprise application with various task options using the old application output format

The example properties install an enterprise application with task options. The properties file displays all columns, including hidden and non-hidden columns, of install task and task data values in separate rows. The mutables row shows which columns we can edit (true) and which we cannot edit (false).


Install an enterprise application with various task options using the simple output format

The example properties install an enterprise application with task options. The example shows application properties that have been extracted with the SimpleOutputFormat option. With this option, the properties file displays non-hidden columns of application properties in columnName=value pairs. Hidden columns of application properties are not included in the output. We might find that extracting application properties files with the SimpleOutputFormat option produces a format that is easier to read and edit.


Update a single file in a deployed enterprise application

The example properties add a single file to a deployed application:

Remove a single file from a deployed enterprise application

The example properties delete a single file from a deployed application:


Update a single module in a deployed enterprise application

The example properties add a single module to a deployed application:


Remove a single module from a deployed enterprise application

The example properties delete a single module from a deployed application:


Replace, add, or delete multiple files of a deployed enterprise application

This option specifies to update multiple files of an installed application by uploading a compressed file. Depending on the contents of the compressed file, a single use of this option can replace files in, add new files to, and delete files from the installed application. Each entry in the compressed file is treated as a single file and the path of the file from the root of the compressed file is treated as the relative path of the file in the installed application.

To replace a file, a file in the compressed file must have the same relative path as the file to be updated in the installed application.

To add a new file to the installed application, a file in the compressed file must have a different relative path than the files in the installed application.

The relative path of a file in the installed application is formed by concatenation of the relative path of the module, if the file is inside a module, and the relative path of the file from the root of the module separated by a forward slash (/).

To remove a file from the installed application, specify metadata in the compressed file using a file named META-INF/ibm-partialapp-delete.props at any archive scope. The ibm-partialapp-delete.props file must be an ASCII file that lists files to be deleted in that archive with one entry for each line. The entry can contain a string pattern such as a regular expression that identifies multiple files. The file paths for the files to be deleted must be relative to the archive path that has the META-INF/ibm-partialapp-delete.props file.

For more information about the metadata .props file to include in compressed files, see the "Replace, add, or delete multiple files" section in Preparing for application update settings.


Examples

Use myAppPartial.zip to update a deployed application named hello


Replace the entire deployed enterprise application


Uninstall a deployed application


Update the deployment options of a deployed application


Edit the deployment properties of a web module


What to do next

If the properties file deploys an application or module, test the deployed application or module. For example, enter the URL for a deployed application in a web browser and examine the performance of the application.

If the deployment is not successful, read messages in the SystemOut.log file, fix the error condition, and add the properties file to the monitored directory again.


  • Install enterprise application files by adding them to a monitored directory
  • Use application properties files to install, update, and delete enterprise application files
  • Set monitored directory deployment values
  • Install enterprise application files
  • Uninstall enterprise application files by dragging them from a monitored directory
  • Use High Performance Extensible Logging to troubleshoot applications
  • Prepare for application update settings
  • Directory conventions
  • Rational Application Developer documentation