IBM WebSphere Application ServerTM
Release 8

com.ibm.websphere.ant.tasks
Class StartServer

java.lang.Object
  extended by Task
      extended by com.ibm.websphere.ant.tasks.ServerControl
          extended by com.ibm.websphere.ant.tasks.StartServer

public class StartServer
extends ServerControl

The wsStartServer task enables you to start a standalone server instance. This is not used to start a server controlled by DeploymentManager. Therefore, this task is useful for the Base Application Server, and to start the Node Agent and/or DeploymentManager. If you wish to start a server managed by the Deployment Manager, use the wsadmin task to execute a scripting command. The structure of the wsStartServer task is shown below:

<wsStartServer server="name of the server to start" profileName="the profile name of the desired server" noWait="true | false" quiet="true | false" logFile="name of the file to log to" replaceLog="true | false" trace="true | false" script="the name of a script file to execute during server startup" timeout="amount of time to wait for the server to start" statusPort="port for the server to send status messages to" username="name of the admin userid id to authenticate with" password="password of the admin user to authenticate with" wasHome="WebSphere Installation directory" failonerror="true | false" fileEncoding="UTF8"/> The server attribute is required and contains the name of the server you wish to start
The profileName attribute is optional and it contains the name of the server profile to be used
The noWait attribute is optional. If true, the task with return immediately without waiting for the server to start (default is false).
The quiet attribute is optional. If true, the task will not print any status information (default is false).
The logFile attribute is optional and specifies the name of the file to log the server start information to.
The replaceLog attribute is optional. If true, the task with erase an existing log file, instead of appending (default is false).
The trace attribute is optional. If true, the task with print trace information (default is false).
The script attribute is optional and specifies the name of a script file to execute during server startup.
The timeout attribute is optional and specified the amount of time to wait for the server to successfully start.
The statusPort attribute is optional and specifies the TCP Port the server should send status messages to.
The username attribute is optional and specifies the id of the admin user to authenticate with for administrative access.
The password attrubute is optional and specifies the password of the admin user to authenticate with for administrative access
The wasHome attribute is optional and it specifies the WebSphere installation directory
The failonerror attribute is optional and if set to true causes the build to stop if the task has an error (default is false).
The fileEncoding attribute is optional and sets the file.encoding System Property for the underlying VM.

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


Constructor Summary
StartServer()
           
 
Method Summary
 void addAdditionalArgs(java.util.ArrayList<java.lang.String> args)
           
 void addJvmArgs(Java jvm)
           
 java.lang.String getMainClass()
           
 java.lang.String getTaskName()
           
 void setScript(java.lang.String script)
          Sets the script.
 
Methods inherited from class com.ibm.websphere.ant.tasks.ServerControl
execute, isDebug, runScript, setDebug, setFailonerror, setFileEncoding, setJvmMaxMemory, setLogFile, setNoWait, setPassword, setProfileName, setQuiet, setReplaceLog, setServer, setStatusPort, setTimeout, setTrace, setUsername, setWasHome
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StartServer

public StartServer()
Method Detail

getMainClass

public java.lang.String getMainClass()
Specified by:
getMainClass in class ServerControl
See Also:
ServerControl.getMainClass()

addAdditionalArgs

public void addAdditionalArgs(java.util.ArrayList<java.lang.String> args)
Specified by:
addAdditionalArgs in class ServerControl
See Also:
ServerControl.addAdditionalArgs(ArrayList)

addJvmArgs

public void addJvmArgs(Java jvm)
Specified by:
addJvmArgs in class ServerControl
See Also:
ServerControl.addJvmArgs(Java)

setScript

public void setScript(java.lang.String script)
Sets the script.

Parameters:
script - The script to set

getTaskName

public java.lang.String getTaskName()
Specified by:
getTaskName in class ServerControl
See Also:
Task#getTaskName()

IBM WebSphere Application ServerTM
Release 8