Undeploying Applications

You can undeploy an application from the Administrator UI or CLI. When you undeploy an application, the system queues the request and applies it to components as they become available. During undeployment, dependencies are taken into account to allow processes to clean up before removing components and bindings.

If you are undeploying a very large application, the undeployment can take a significant amount of time. As it goes through the undeployment phases namely optPreFlight and undeploy, its progress is recorded in the SystemNode.log file (using the logger com.tibco.amx.admin.api.application at the INFO level). SystemNode.log file is located at CONFIG_HOME\tibcohost\<instance_name>\data_3.2.x\nodes\SystemNode\logs\ directory. For more information about the deployment phases, see Undeployment Preflight Check.

GUI

Procedure

  1. Click the Applications button.
  2. In the Applications list, select one or more applications.
  3. Choose an undeploy option.
    Option Procedure
    Undeploy

    Dependencies on target product applications are checked.

    1. Do one of the following:
      • Click Undeploy.
      • Select Undeploy > Undeploy.
        Note: If the application has multiple versions deployed, a dialog will display all the versions. Select the version to undeploy.
    2. If any of the selected applications has dependencies, the Application Dependencies to Undeploy dialog displays with target applications.
    3. Check the checkboxes next to the target applications to undeploy.
    4. Click Undeploy. The selected target applications are undeployed. The length of time this action takes to complete depends on how long it takes for the target applications to complete their processing. It might take up to several days or longer.
    Force Undeploy

    Dependencies on target product applications are not checked.

    1. Select Undeploy > Force undeploy.
      Note: If the application has multiple versions deployed, a dialog will display all the versions. Select the version to Force undeploy.
    2. Click Undeploy. Components in the selected applications are allowed to perform clean up operations. In rare cases, a component might stop responding while performing its cleanup. When that happens, a node that becomes unusable might need to be restarted. If a component stores information in a database or file, that data might remain after a force undeploy and must be cleaned up manually.
    More undeploy options
    1. Select Undeploy > More undeploy options.
    2. Check the check boxes for one or more of the following options:
      • Resolve Mode - Dependencies on target product applications are checked.

        If any of the selected applications has dependencies, the Application Dependencies to Undeploy dialog displays with target applications. The applications are deleted from the node and the runtime state changes to Not deployed. The nodes where the applications are undeployed are restarted to load software updates.

      • Force Undeploy - Dependencies on target product applications are not checked.

        Components in the selected applications are allowed to perform clean up operations. In rare cases, a component might hang while performing its cleanup. When that happens a node that becomes unusable might need to be restarted. If a component stores information in a database or file, that data might remain after a force undeploy and must be cleaned up manually.

    3. Click Undeploy to undeploy the application or Cancel to cancel the undeployment process.

CLI

Procedure

  1. In the data file, specify Environment and Application elements in base format. Drivers required for the application resource instances can be specified inside the <Application> element in the data.xml file.
    <Environment xsi:type="amxdata:Environment" name="envName" >
     <Application xsi:type="amxdata:Application" name="test.app1" contact="TIBCO Inc." description="Test application with imported resource template which requires a driver feature" importResourceTemplates="true" resourceTemplatesScope="Application">
    		
                <Node name="${dev.node.name}" environmentName="${dev.envt.name}"/>
                <ApplicationTemplate xsi:type="amxdata_reference:ApplicationTemplate_reference" name="AppTemplate"/>
    			
    			<!-- Specify the resource template in the DAA and the required driver feature. -->
    			<Driver resourceTemplateName="OracleResourceTemplate" driverFeatureName="com.tibco.tpcl.gen.oracle.jdbc.feature" driverFeatureVersion="11.2.100.001"/>
    			
            </Application>
    </Environment>
  2. In the build file, set the action attribute of the AMXAdminTask element to undeploy and the objectSelector attribute to Environment/Application. To perform a force undeploy, specify the -force option.
    <AMXAdminTask action="undeploy" objectSelector="Environment/Application" [-force] />
  3. Invoke the command-line interface on the build file.