[AIX Solaris HP-UX Linux Windows]

Installing enterprise application files by adding them to a monitored directory

You can install an enterprise application file on an application server by dragging or copying an enterprise archive (EAR), web application archive (WAR), Java™ archive (JAR), or Session Initiation Protocol (SIP) archive (SAR) to a monitored directory. An enterprise application file must conform to the Java Platform, Enterprise Edition (Java EE) specification.

Before you begin

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

Installing an EAR, JAR, WAR, or SAR file by adding it to a monitored directory does not change existing Java Naming and Directory (JNDI) and other application bindings. If you must set binding values during deployment, install the file using the administrative console application installation wizard, a wsadmin script, or a properties file that sets bindings. See Installing enterprise application files by adding properties files to a monitored directory.

By default, monitored directory deployment is not enabled. Before you can use monitored directory deployment, you must enable it. See Setting monitored directory deployment values.

Restriction: Installing an EAR, JAR, WAR, or SAR file by adding it to a monitored directory is available only on distributed and z/OS® operating systems. It is not supported on IBM i operating systems.
避免困難 避免困難: Do not use monitored directory deployment in a production environment where the application must remain continuously available. Instead, in production environments, use an automated process that staggers application updates to each application server by first draining requests from each server, updating the application, and then restarting the server. For information about this automated process, see IBM WebSphere Developer Technical Journal: Maintain continuous availability while updating WebSphere Application Server enterprise applications.gotcha

About this task

You can deploy an EAR, JAR, WAR, or SAR file to an application server by dragging or copying the file to a monitored directory.

For base (stand-alone) application servers, the monitored directory is the monitoredDeployableApps/servers/server_name directory of the application server profile.

The product scans a monitored directory for new applications no more frequently than every five seconds, by default. After finding a new EAR, JAR, WAR, or SAR file in a monitored directory, the product installs the file on the application server and starts the application or module.

After you add an EAR file to a monitored directory, the product creates a temporary copy of the EAR file in another directory and installs the file on the server. After you add a JAR, WAR, or SAR file to a monitored directory, the product creates a temporary copy of the archive in another directory, wraps the archive in an EAR file named archive_extension.ear, and installs the new EAR file. For example, simpleApp.war is installed as simpleApp_war.ear. The original archive that you added to the monitored directory is not changed.

You can update application files the same way. If you later add an updated EAR, JAR, WAR, or SAR file to the same monitored directory, the product stops the previously deployed application, installs the updated file on the application server, and starts the updated application or module. For example, suppose you previously deployed my_app.ear by dragging it to a monitored directory. If you later drag a file named my_app.ear to the monitored directory, the product replaces the previously deployed EAR file with the updated EAR file that has the same name. The server must be running for the product to notice changes to files in its monitored directory.

You can use a graphical file browser to drag or copy the EAR, JAR, WAR, or SAR file. Alternatively, you can use operating system commands to copy a file into a monitored monitoredDeployableApps subdirectory.

Procedure

  1. Ensure that the application server on which you want to install the enterprise application file is running.
  2. Ensure that monitored directory deployment is enabled.

    See Setting monitored directory deployment values.

  3. Browse the file structure of the computer and find the monitored directory.
    For base (stand-alone) application servers, the monitored directory is under the application server profile. The directory path is:
    • [AIX Solaris HP-UX Linux Windows]app_server_root/profiles/application_server_profile_name/monitoredDeployableApps/servers/server_name
    For stand-alone servers, the product creates a monitored server_name directory automatically.
  4. Copy the EAR, JAR, WAR, or SAR file that you want to deploy to the monitored directory.

    Choose a file that is not already deployed to the target monitored directory, unless you want to update a currently deployed file.

Results

The product adds a directory having the same name as the file to the installedApps/cell_name 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_name 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.

Note: 這個主題參照一或多個應用程式伺服器日誌檔。 此外,在分散式和 IBM i 系統上,另外也建議您可以配置伺服器來使用「高效能可延伸記載 (HPEL)」日誌和追蹤基礎架構,而不使用 SystemOut.log、SystemErr.log, trace.log 及 activity.log 檔案。HPEL 與原生 z/OS 記載機能也可以一起使用。如果您使用 HPEL,則可以從伺服器設定檔 bin 目錄,利用 LogViewer 指令行工具來存取您所有的日誌和追蹤資訊。請參閱有關利用 HPEL 疑難排解應用程式的資訊,以取得更多使用 HPEL 的相關資訊。

Example

Suppose you want to install the sample DynaCacheEsi.ear file by copying the EAR file to a monitored directory. You can find the sample EAR file in the app_server_root/installableApps directory.

Deploying an EAR file on a stand-alone application server
  1. Ensure that the application server on which you want to install the DynaCacheEsi.ear file is running.

    To see if the server is running, you can use the serverStatus -all command. To start the server, you can use the startServer server_name command.

    [AIX Solaris HP-UX Linux Windows]For example, suppose the stand-alone application server has a profile name of AppSrv02. Run the serverStatus command from a command prompt at the app_server_root/profiles/AppSrv02/bin directory:
    serverStatus -all

    If the server is not running, start the server.

    [AIX Solaris HP-UX Linux Windows]For example, to start an application server named server1 on AppSrv02, run the startServer command from a command prompt at the app_server_root/profiles/AppSrv02/bin directory:
    startServer server1
    The Server server1 open for e-business message indicates that the server is running.
  2. Locate the monitored directory.

    [AIX Solaris HP-UX Linux Windows]For the stand-alone AppSrv02 profile, the monitored directory is app_server_root/profiles/AppSrv02/monitoredDeployableApps/servers/server1.

  3. Copy the DynaCacheEsi.ear file in the app_server_root/installableApps directory to the monitored directory.
  4. Verify that the directory for installed applications exists.
    • [AIX Solaris HP-UX Linux Windows]app_server_root/profiles/AppSrv02/installedApps/cell_name/DynaCacheEsi.ear
  5. Verify that DynaCacheEsi.ear is in the list of installed enterprise applications and is running.

What to do next

Test the deployed application or module. For example, point a web browser at the URL for a deployed application 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 application or module to the monitored directory again.


指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: July 9, 2016 8:12
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-base-dist&topic=trun_app_install_dragdrop
檔名:trun_app_install_dragdrop.html