com.ibm.websphere.ant.tasks

Class StopApplication

  1. java.lang.Object
  2. extended byTask
  3. extended bycom.ibm.websphere.ant.tasks.WsAdmin
  4. extended bycom.ibm.websphere.ant.tasks.StopApplication

  1. public class StopApplication
  2. extends WsAdmin
The wsStopApp task enables you to stop an existing or newly installed application on a WebSphere Server or in a WebSphere Cell. This task is a subclass of the wsadmin task and shares many of the same attributes. This task is a wrapper for the ApplicationManager.stopApplication() command of the wsadmin tool. Refer to the wsadmin documentation for information on this operation. The structure of the wsStopApp task is shown below: <wsstopapp washome="location of websphere installation" server="the name of the server containing the application to start" node="the name of the node containing the application to start" application="the name of the application to stop" properties="java properties file containing attributes to set in the jvm system properties" profile="a script file to be executed before the main command or file" profilename="the profile name of the desired server" conntype="specifies the type of connection to be used." host="the host to connect to" port="the port on the host to connect to" user="user id to authenticate with" password="password to authenticate with failonerror="true |false"/> The wasHome attribute is optional and contains the location of the WebSphere Installation Directory.
The server attribute is optional and specifies the name of the server containing the application you wish to start
The node attribute is optional and specifies the name of the node containing the application you wish to start
The application attribute is required and specifies the name of the application you wish to stop
The properties attribute is optional and it contains a java properties file containing attributes to set in the JVM System properties
The profile attribute is optional and it contains a script file to be executed before the main command or file
The profileName attribute is optional and it contains the name of the server profile to be used
The conntype attribute is optional and it specifies the type of connection to be used. The Default type is SOAP. The valid values are SOAP, RMI, JMS, and NONE. NONE means that no server connection is made. The host attribute is optional and only specified if the conntype is specified. It contains the hostname of the machine to connect to
The port attribute is optional and only specified if the conntype is specified. It contains the port on the host to connect to
The user attribute is optional and contains the user ID to authenticate with
The password attribute is optional and contains the password to authenticate with
The failonerror attribute is optional. When this is specified the build will fail if any exception is thrown. The default is false.

To use this task, add the following to your Ant build.xml <taskdef name="wsStopApp" classname="com.ibm.websphere.ant.tasks.StopApplication"/>

Constructor Summary

Constructor and Description
StopApplication()
Constructor for StopApplication.

Method Summary

Modifier and Type Method and Description
  1. void
execute()
  1. void
setApplication(java.lang.String application)
Sets the ear.
  1. void
setCommand(java.lang.String command)
Disabled in this subclass
  1. void
setLang(java.lang.String lang)
Disabled in this subclass
  1. void
setNode(java.lang.String node)
Sets the name of the node containing the application.
  1. void
setScript(java.lang.String script)
Disabled in this subclass
  1. void
setServer(java.lang.String server)
Sets the name of the server containing the application.
Methods inherited from class com.ibm.websphere.ant.tasks.WsAdmin
createArg, createJvmarg, isDebug, setConntype, setDebug, setFailonerror, setFileEncoding, setHost, setJvmMaxMemory, setPassword, setPort, setProfile, setProfileName, setProperties, setUser, setWasHome
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StopApplication

  1. public StopApplication()
Constructor for StopApplication.

Method Detail

setCommand

  1. public void setCommand(java.lang.String command)
Disabled in this subclass
Overrides:
setCommand in class WsAdmin
Parameters:
command - The command to set

setLang

  1. public void setLang(java.lang.String lang)
Disabled in this subclass
Overrides:
setLang in class WsAdmin
Parameters:
lang - The lang to set

setScript

  1. public void setScript(java.lang.String script)
Disabled in this subclass
Overrides:
setScript in class WsAdmin
Parameters:
script - The script to set

setApplication

  1. public void setApplication(java.lang.String application)
Sets the ear.

setServer

  1. public void setServer(java.lang.String server)
Sets the name of the server containing the application.
Parameters:
server - The name of the server

setNode

  1. public void setNode(java.lang.String node)
Sets the name of the node containing the application.
Parameters:
node - The name of the node

execute

  1. public void execute()
  2. throws BuildException
Overrides:
execute in class WsAdmin
Throws:
BuildException
See Also:
Task#execute()