WebLogic Scripting Tool
|
|
The following sections describe the WLST commands and variables in detail. Topics include:
Note: It is recommended that you review Requirements for Entering WLST Commands for command syntax requirements.
WLST commands are divided into the following categories.
Use the WLST browse commands, listed in Table A-2, to navigate the hierarchy of configuration or runtime beans and control the prompt display.
Command Category: Browse Commands
Use with WLST: Online or Offline
Navigates the hierarchy of configuration or runtime beans. This command uses a model that is similar to navigating a file system in a Windows or UNIX command shell. For example, to navigate back to a parent configuration or runtime bean, enter cd('..'). The character string.. (dot-dot), refers to the directory immediately above the current directory. To get back to the root bean after navigating to a bean that is deep in the hierarchy, enter cd('/').
You can navigate to beans in the current hierarchy and to any child or instance.
The cd command returns a stub of the configuration or runtime bean instance, if one exists. If you navigate to a type, this command returns a stub of the configuration or runtime bean instance from which you navigated. In the event of an error, the command returns a WLSTException.
Note: The cmo variable is initialized to the root of all domain configuration beans when you first connect WLST to a server instance. It reflects the parent configuration bean type until you navigate to an instance. For more information about the cmo variable, see Changing the Current Management Object.
cd(mbeanName)
The following example navigates the hierarchy of configuration beans. The first command navigates to the Servers configuration bean type, the second, to the myserver configuration bean instance, and the last back up two levels to the original directory location.
wls:/mydomain/serverConfig>cd('Servers')wls:/mydomain/serverConfig/Servers>cd('myserver')wls:/mydomain/serverConfig/Servers/myserver>cd('../..')wls:/mydomain/serverConfig>
Command Category: Browse Commands
Use with WLST: Online
Returns the current location in the hierarchy. This command enables you to store the current location in the hierarchy and easily return to it after browsing. In the event of an error, the command returns a WLSTException.
currentTree()
The following example stores the current location in the hierarchy in myTree and uses it to navigate back to the Edit MBean hierarchy from the runtime MBean hierarchy on an Administration Server instance.
wls:/mydomain/edit>myTree=currentTree()wls:/mydomain/edit>serverRuntime()Location changed to serverRuntime tree. This is a read-only tree withwls:/mydomain/serverRuntime>
ServerRuntimeMBean as the root.
For more help, use help('serverRuntime')myTree()wls:/mydomain/edit>
Command Category: Browse Commands
Use with WLST: Online or Offline
Toggles the display of path information at the prompt, when entered without an argument. This command is useful when the prompt becomes too long due to the length of the path.
You can also explicitly specify on or off as an argument to the command. When you specify off, WLST hides the WLST prompt and defaults to the Jython prompt. By default, the WLST prompt displays the configuration or runtime navigation path information.
When you disable the prompt details, to determine your current location in the hierarchy, you can use the pwd command, as described in pwd.
In the event of an error, the command returns a WLSTException.
prompt(myPrompt)
|
Optional. Hides or displays WLST prompt. Valid values include
|
The following example hides and then redisplays the path information at the prompt.
wls:/mydomain/serverConfig/Servers/myserver>prompt()wls:/> prompt()
wls:/mydomain/serverConfig/Servers/myserver>
The following example hides the prompt and defaults to the Jython prompt (since the command is run using WLST online), changes the Jython prompt, and then redisplays the WLST prompt. This example also demonstrates the use of the pwd command.
Note: For more information about programming using Jython, see http://www.jython.org.
wls:/mydomain/serverConfig/Servers/myserver>prompt('off')>>>sys.ps1="myprompt>"myprompt>prompt()wls:>pwd()`serverConfig:Servers/myserver'
wls:>prompt()wls:/mydomain/serverConfig/Servers/myserver>
Command Category: Browse Commands
Use with WLST: Online or Offline
Displays the current location in the configuration or runtime bean hierarchy.
This command is useful when you have turned off the prompt display of the path information using the prompt command, as described in prompt.
In the event of an error, the command returns a WLSTException.
pwd()
The following example displays the current location in the configuration bean hierarchy.
wls:/mydomain/serverConfig/Servers/myserver/Log/myserver>pwd()'serverConfig:/Servers/myserver/Log/myserver'
Use the WLST control commands, listed in Table A-3, to perform the following tasks:
Table A-3 lists the control commands for WLST configuration.
Command Category: Control Commands
Use with WLST: Offline
Extends the current domain using an application or service extension template. In the event of an error, the command returns a WLSTException.
addTemplate(templateFileName)
The following example opens a domain and extends it using the specified extension template, DefaultWebApp.jar.
wls:/offline>readDomain('c:/bea/user_projects/domains/wlw')wls:/offline/wlw>addTemplate('c:/bea/weblogic91/common/templates/
applications/DefaultWebApp.jar')wls:/offline/wlw>
Command Category: Control Commands
Use with WLST: Offline
Closes the current domain. The domain is no longer available for editing once it is closed. In the event of an error, the command returns a WLSTException.
closeDomain()
The following example closes the current domain:
wls:/offline>readDomain('c:/bea/user_projects/domains/medrec')...
wls:/offline/medrec>updateDomain()wls:/offline/medrec>closeDomain()wls:/offline>
Command Category: Control Commands
Use with WLST: Offline
Closes the current domain template. The domain template is no longer available once it is closed. In the event of an error, the command returns a WLSTException.
closeTemplate()
The following example opens an existing domain template, performs some operations, and then closes the current domain template.
wls:/offline>readTemplate('c:/bea/weblogic81/common/templates/domains/...
wls.jar')
wls:/offline/wls>closeTemplate()wls:/offline>
Command Category: Control Commands
Use with WLST: Online or Offline
Connects WLST to a WebLogic Server instance.
You can specify the username and password on the command line, or you can specify an encrypted password that is stored locally by specifying the locations of the user configuration and key files as arguments to the connect command. For information about creating the user configuration and key files, see storeUserConfig.
If you run the connect command without specifying the username and password, WLST attempts to process the command using one of the methods listed below (in order of precedence):
If you do not specify the Administration Server name, the argument defaults to AdminServer.
Warning: An insecure protocol was used to connect to the server. To ensure
on-the-wire security, the SSL port or Admin port should be used instead.
java -Dweblogic.security.SSL.ignoreHostnameVerification=true
-Dweblogic.security.TrustKeyStore=DemoTrust weblogic.WLST
For more information about invoking WLST, see Main Steps for Using WLST.
TunnelingEnabled attribute is set to true for the WebLogic Server instance. For more information, see TunnelingEnabled in WebLogic Server MBean Reference.After successfully connecting to a WebLogic Server instance, all the local variables are initialized.
In the event of an error, the command returns a WLSTException.
connect([username,password], [url], [adminServerName])
connect([userConfigFile,userKeyFile], [adminServerName])
|
Optional. Username of the operator who is connecting WLST to the server. If not specified, WLST processes the command as described above. |
|
|
Optional. Password of the operator who is connecting WLST to the server. If not specified, WLST processes the command as described above. |
|
|
Optional. Listen address and listen port of the server instance, specified using the following format: |
|
|
Optional. Name and location of a user configuration file which contains an encrypted username and password. When you create a user configuration file, the |
|
|
Optional. Name and location of the key file that is associated with the specified user configuration file and is used to decrypt it. (See storeUserConfig.) |
|
|
Optional. Name of the Administration Server. This value is used when WLST is invoked from a domain directory. This argument defaults to |
The following example connects WLST to a WebLogic Server instance. In this example, the Administration Server name defaults to AdminServer. Note that a warning is displayed if the SSL or administration port is not used to connect to the server.
wls:/offline>connect('weblogic','weblogic','t3://localhost:8001')Connecting to weblogic server instance running at t3://localhost:8001 as username weblogic...
Successfully connected to Admin Server 'AdminServer' that belongs to domain
'mydomain'.
Warning: An insecure protocol was used to connect to the server. To ensure on-the-wire security, the SSL port or Admin port should be used instead.
wls:/mydomain/serverConfig>
The following example connects WLST to a WebLogic Server instance at the specified URL. In this example, the username and password are passed as variables. This example uses a secure protocol.
wls:/offline>username = 'weblogic'wls:/offline>password = 'weblogic'wls:/offline>connect(username,password,'t3s://myhost:8001')Connecting to weblogic server instance running at t3://myhost:8001 as
username weblogic...
Successfully connected to Admin Server 'AdminServer' that belongs to domain
'mydomain'.
wls:/mydomain/serverConfig>
The following example connects WLST to a WebLogic Server instance using a user configuration and key file to provide user credentials. The Administration Server name defaults to AdminServer.
wls:/offline>connect(userConfigFile='c:/myfiles/myuserconfigfile.secure', userKeyFile='c:/myfiles/myuserkeyfile.secure')Connecting to weblogic server instance running at t3://localhost:7001 as
username ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'mydomain'.
wls:/mydomain/serverConfig>
Command Category: Control Commands
Use with WLST: Offline
Creates a domain using the specified template.
Note: If you wish to modify the domain configuration settings when creating a domain, see Option 2 in Creating a Domain (Offline).
The createDomain command is similar in functionality to the unpack command, as described in Creating Templates and Domains Using the pack and unpack Commands.
In the event of an error, the command returns a WLSTException.
createDomain(domainTemplate, domainDir, user, password)
|
Name and location of the domain template from which you want to create a domain. |
|
|
Name of the directory to which you want to write the domain configuration information. |
|
The following example creates a new domain using the Avitek MedRec template and sets the default username and password to weblogic. The domain is saved to the following directory: c:/bea/user_projects/domains/medrec.
wls:/offline>createDomain('c:/bea/weblogic91/common/templates/domains
/wls_medrec.jar','c:/bea/user_projects/domains/medrec', 'weblogic', 'weblogic')
Command Category: Control Commands
Use with WLST: Online
Disconnects WLST from a WebLogic Server instance. The disconnect command does not cause WLST to exit the interactive scripting shell; it closes the current WebLogic Server instance connection and resets all the variables while keeping the interactive shell alive.
In the event of an error, the command returns a WLSTException.
You can connect to another WebLogic Server instance using the connect command, as described in connect.
The following example disconnects from a running server:
wls:/mydomain/serverConfig>disconnect()Disconnected from weblogic server: myserver
wls:/offline>
Command Category: Control Commands
Use with WLST: Online or Offline
Exits WLST from the user session and closes the scripting shell.
If there is an edit session in progress, WLST prompts you for confirmation. To skip the prompt, set the defaultAnswer argument to y.
By default, WLST calls System.exit(0) for the current WLST JVM when exiting WLST. If you would like the JVM to exit with a different exit code, you can specify a value using the exitCode argument.
Note: When the WLST exit command is issued within an Ant script, it may also exit the execution of the Ant script. It is recommended that when invoking WLST within an Ant script, you fork a new JVM by specifying fork="true".
In the event of an error, the command returns a WLSTException.
exit([defaultAnswer], [exitcode])
|
Optional. Default response, if you would prefer not to be prompted at the command line. Valid values are |
|
The following example disconnects from the user session and closes the scripting shell.
wls:/mydomain/serverConfig>exit()Exiting WebLogic Scripting Tool ...
c:\>
The following example disconnects from the user session, closes the scripting shell, and sets the error code to 101.
wls:/mydomain/serverConfig>exit(exitcode=101)Exiting WebLogic Scripting Tool ...
c:\>
Command Category: Control Commands
Use with WLST: Offline
Opens an existing domain for updating.
When you open a template or domain, WLST is placed into the configuration bean hierarchy for that domain, and the prompt is updated to reflect the current location in the configuration hierarchy. For example:
WebLogic Server configuration beans exist within a hierarchical structure. In the WLST file system, the hierarchies correspond to drives; types and instances are directories; attributes and operations are files. WLST traverses the hierarchical structure of configuration beans using commands such as cd, ls, and pwd in a similar way that you would navigate a file system in a UNIX or Windows command shell. After navigating to an configuration bean instance, you interact with the bean using WLST commands. For more information, see Navigating and Interrogating MBeans.
In the event of an error, the command returns a WLSTException.
readDomain(domainDirName)
The following example opens the medrec domain for editing.
wls:/offline>readDomain('c:/bea/user_projects/domains/medrec')wls:/offline/medrec>
Command Category: Control Commands
Use with WLST: Offline
Opens an existing domain template for domain creation.
When you open a domain template, WLST is placed into the configuration bean hierarchy for that domain template, and the prompt is updated to reflect the current location in the configuration hierarchy. For example:
WebLogic Server configuration beans exist within a hierarchical structure. In the WLST file system, the hierarchies correspond to drives; types and instances are directories; attributes and operations are files. WLST traverses the hierarchical structure of configuration beans using commands such as cd, ls, and pwd in a similar way that you would navigate a file system in a UNIX or Windows command shell. After navigating to a configuration bean instance, you interact with the bean using WLST commands. For more information, see Navigating and Interrogating MBeans.
Note: Using WLST and a domain template, you can only create and access security information when you are creating a new domain. When you are updating a domain, you cannot access security information through WLST.
In the event of an error, the command returns a WLSTException.
readTemplate(templateFileName)
The following example opens the medrec.jar domain template for domain creation.
wls:/offline>readTemplate('c:/bea/weblogic91/common/templates/domainswls:/offline/wls_medrec>
/wls_medrec.jar')
Command Category: Control Commands
Use with WLST: Offline
Updates and saves the current domain. The domain continues to be editable after you update and save it.
In the event of an error, the command returns a WLSTException.
updateDomain()
The following examples opens the medrec domain, performs some operations, and updates and saves the current domain:
wls:/offline>readDomain('c:/bea/user_projects/domains/medrec')...
wls:/offline/medrec>updateDomain()
Command Category: Control Commands
Use with WLST: Offline
Writes the domain configuration information to the specified directory.
Once you write the domain to file system, you can continue to update the domain template object that exists in memory, and reissue the writeDomain command to store the domain configuration to a new or existing file.
By default, when you write a domain, the associated applications are written to BEAHOME/user_projects/applications/domainname, where BEAHOME specifies the BEA home directory and domainname specifies the name of the domain. This directory must be empty; otherwise, WLST displays an error.
When you have finished using the domain template object in memory, close it using the closeTemplate command. If you want to edit the domain that has been saved to disk, you can open it using the readDomain command.
Note: The name of the domain is derived from the name of the domain directory. For example, for a domain saved to c:/bea/user_projects/domains/myMedrec, the domain name is myMedrec.
Before writing the domain, you must define a password for the default user, if it is not already defined. For example:
cd('/Security/base_domain/User/weblogic')
cmo.setPassword('weblogic')
In the event of an error, the command returns a WLSTException.
writeDomain(domainDir)
The following example reads the medrec.jar domain templates, performs some operations, and writes the domain configuration information to the c:/bea/user_projects/domains/medrec directory.
wls:/offline>readTemplate('c:/bea/weblogic81/common/templates/domains...
/wls.jar')
wls:/offline/base_domain>writeDomain('c:/bea/user_projects/domains/base_domain')
Command Category: Control Commands
Use with WLST: Offline
Writes the domain configuration information to the specified domain template. You can use the domain configuration template to recreate the domain.
Once your write the configuration information to the domain configuration template, you can continue to update the domain or domain template object that exists in memory, and reissue the writeDomain or writeTemplate command to store the domain configuration to a new or existing domain or domain template file. For more information, see writeDomain or writeTemplate, respectively.
In the event of an error, the command returns a WLSTException.
Note: The writeTemplate command is similar in functionality to the pack command, as described in Creating Templates and Domains Using the pack and unpack Commands. However, writeTemplate does not support creating a Managed Server template.
writeTemplate(templateName)
The following example writes the current domain configuration to the domain template named c:/bea/user_projects/templates/myTemplate.jar.
wls:/offline>readDomain('c:/bea/user_projects/domains/mydomain')...
wls:/offline/base_domain>writeTemplate('c:/bea/user_projects/templates/myTemplate.jar')
Use the WLST deployment commands, listed in Table A-4, to:
For more information about deploying applications, see Deploying Applications to WebLogic Server.
|
Updates an application configuration using a new deployment plan. |
Command Category: Deployment Commands
Use with WLST: Online
Deploys an application to a WebLogic Server instance.
The deploy command returns a WLSTProgress object that you can access to check the status of the command. For more information about the WLSTProgress object, see WLSTProgress Object. In the event of an error, the command returns a WLSTException.
Note: If there is an edit session in progress, the deploy command does not block user interaction.
deploy(appName,path, [targets], [stageMode], [planPath], [options])
|
Name of the application or standalone J2EE module to be deployed. |
|
|
Name of the application directory, archive file, or root of the exploded archive directory to be deployed. |
|
|
Optional. Comma-separated list of the target. Each target may be qualified with a J2EE module name (for example, |
|
|
Optional. Staging mode for the application you are deploying. Valid values are |
|
|
Optional. Name of the deployment plan file. The filename can be absolute or relative to the application directory. This argument defaults to the |
|
|
Optional. Comma-separated list of deployment options, specified as name-value pairs. Valid options include:
|
|
|
The following example deploys the businessApp application located at c:/myapps/business, A default deployment plan is created.
The deploy command returns a WLSTProgress object that you can access to check the status of the command. The WLSTProgress object is captured in a user-defined variable, in this case, progress.
wls:/mydomain/serverConfig/Servers>progress= deploy(appName='businessApp',path='c:/myapps/business',createplan='true')
The previous example stores the WLSTProgress object returned in a user-defined variable, in this case, progress. You can then use the progress variable to print the status of the deploy command. For example:
wls:/mydomain/serverConfig/Servers>progress.printStatus()Current Status of your Deployment:
Deployment command type: deploy
Deployment State : completed
Deployment Message : null
wls:/mydomain/serverConfig/Servers>
For more information about the WLSTProgress object, see WLSTProgress Object.
The following example deploys the demoApp application in the archive file located at c:/myapps/demos/app/demoApp.ear, targeting the application modules to myserver, and using the deployment plan file located in c:/myapps/demos/app/plan/plan.xml. WLST waits 120,000 ms for the process to complete.
wls:/mydomain/serverConfig/Servers>deploy('demoApp', 'c:/myapps/demos/app/demoApp.ear', targets='myserver', planPath='c:/myapps/demos/app/plan/plan.xml', timeout=120000)
The following example deploys the jmsApp application located at c:/myapps/demos/jmsApp/demo-jms.xml, targeting the application module to a specific target.
wls:/mydomain/serverConfig/Servers>deploy('jmsApp',path='c:/myapps/demos/jmsApps/demo-jms.xml', subModuleTargets='jmsApp@managed1')
The following example shows how to set the application version (appVersion) to a unique identifier to support production (side-by-side) redeployment. This example deploys the demoApp application in the archive file located at c:/myapps/demos/app/demoApp.ear, and sets the application and archive version numbers to the specified values.
wls:/mydomain/serverConfig>deploy('demoApp', 'c:/myapps/demos/app/demoApp.ear', archiveVersion='901-101', appVersion='901-102')
For more information about production redeployment strategies, see Updating Applications in a Production Environment in Deploying Applications to WebLogic Server.
Command Category: Deployment Commands
Use with WLST: Online
Copies the deployment bundle to the specified targets. The deployment bundle includes module, configuration data, and any additional generated code. The distributeApplication command does not start deployment.
The distributeApplication command returns a WLSTProgress object that you can access to check the status of the command. For more information about the WLSTProgress object, see WLSTProgress Object. In the event of an error, the command returns a WLSTException.
distributeApplication(appPath, [planPath], [targets], [options])
|
Name of the archive file or root of the exploded archive directory to be deployed. |
|
|
Optional. Name of the deployment plan file. The filename can be absolute or relative to the application directory. This argument defaults to the |
|
|
Optional. Comma-separated list of targets. Each target may be qualified with a J2EE module name (for example, |
|
|
Optional. Comma-separated list of deployment options, specified as name-value pairs. For a list of valid deployment options, see the |
The following example loads the BigApp application located in the c:/myapps directory, and stores the WLSTProgress object in a user-defined variable, in this case, progress.
The following example distributes the c:/myapps/BigApp application to the myserver, oamserver1, and oamcluster servers, using the deployment plan defined at c:/deployment/BigApp/plan.xml.
wls:/offline> progress=distributeApplication('c:/myapps/BigApp', 'c:/deployment/BigApp/plan.xml', 'myserver,oamserver1,oamcluster')Distributing Application and Plan ...
Successfully distributed the application.
The previous example stores the WLSTProgress object in a user-defined variable, in this case, progress. You can then use the progress variable to determine if the distributeApplication command has completed. For example:
wls:/mydomain/serverConfig/Servers>progress.isCompleted()1
wls:/mydomain/serverConfig/Servers>
For more information about the WLSTProgress object, see WLSTProgress Object.
Command Category: Deployment Commands
Use with WLST: Online
Returns the WebLogic DeploymentManager object. You can use the object methods to configure and deploy applications. WLST must be connected to an Administration Server to run this command. In the event of an error, the command returns a WLSTException.
getWLDM()
The following example gets the WebLogicDeploymentManager object and stores it in the wldm variable.
wls:/mydomain/serverConfig> wldm=getWLDM()wls:/mydomain/serverConfig> wldm.isConnected()1
wls:/mydomain/serverConfig>
Command Category: Deployment Commands
Use with WLST: Online
Loads an application and deployment plan into memory.
The loadApplication command returns a WLSTPlan object that you can access to make changes to the deployment plan. For more information about the WLSTPlan object, see WLSTPlan Object. In the event of an error, the command returns a WLSTException.
loadApplication(appPath,[planPath], [createPlan])
The following example loads the c:/myapps/myejb.jar application using the plan file at c:/myplans/myejb/plan.xml.
wls:/myserver/serverConfig> myPlan=loadApplication('c:/myapps/myejb.jar', 'c:/myplans/myejb/plan.xml')Loading application from c:/myapps/myejb.jar and deployment plan from c:/myplans/myejb/plan.xml ...
Successfully loaded the application.
wls:/myserver/serverConfig>
The previous example stores the WLSTPlan object returned in the myPlan variable. You can then use myPlan variable to display information about the plan, such as the variables. For example:
wls:/myserver/serverConfig>myPlan.showVariables()MyEJB jndi.ejb
MyWAR app.foo
wls:/myserver/serverConfig>
For more information about the WLSTPlan object, see WLSTPlan Object.
Command Category: Deployment Commands
Use with WLST: Online
Reloads classes and redeploys a previously deployed application.
The redeploy command returns a WLSTProgress object that you can access to check the status of the command. For more information about the WLSTProgress object, see WLSTProgress Object.
In the event of an error, the command returns a WLSTException.
For more information about redeploying applications, see Overview of Common Deployment Scenarios in Deploying Application to WebLogic Server.
redeploy(appName,[planPath], [options])
|
Optional. Name of the deployment plan file. The filename can be absolute or relative to the application directory. This argument defaults to the |
|
|
Optional. Comma-separated list of deployment options, specified as name-value pairs. For a list of valid deployment options, see In addition, the following deployment option can be specified for the |
The following example redeploys myApp application using the plan.xml file located in the c:/myapps directory.
wls:/mydomain/serverConfig> progress=redeploy('myApp' 'c:/myapps/plan.xml')Redeploying application 'myApp' ...
Redeployment of 'myApp' is successful
wls:/mydomain/serverConfig>
The previous example stores the WLSTProgress object returned in a user-defined variable, in this case, progress. You can then use the progress variable to access the state of the redeploy command. For example:
wls:/mydomain/serverConfig/Servers>progress.getState()`completed'
wls:/mydomain/serverConfig/Servers>
For more information about the WLSTProgress object, see WLSTProgress Object.
Command Category: Deployment Commands
Use with WLST: Online
Starts an application, making it available to users. The application must be fully configured and available in the domain.
The startApplication command returns a WLSTProgress object that you can access to check the status of the command. For more information about the WLSTProgress object, see WLSTProgress Object. In the event of an error, the command returns a WLSTException.
startApplication(appName,[options])
|
Name of the application to start, as specified in the |
|
|
Optional. Comma-separated list of deployment options, specified as name-value pairs. For a list of valid deployment options, see |
The following example starts the BigApp application with the specified deployment options.
wls:/offline> progress=startApplication('BigApp', stageMode='NOSTAGE', testMode='false')Starting the application...
Successfully started the application.
The previous example stores the WLSTProgress object returned in a user-defined variable, in this case, progress. You can then use the progress variable to access the state of the startApplication command. For example:
wls:/mydomain/serverConfig/Servers>progress.getState()`completed'
wls:/mydomain/serverConfig/Servers>
For more information about the WLSTProgress object, see WLSTProgress Object.
Command Category: Deployment Commands
Use with WLST: Online
Stops an application, making it unavailable to users. The application must be fully configured and available in the domain.
The stopApplication command returns a WLSTProgress object that you can access to check the status of the command. For more information about the WLSTProgress object, see WLSTProgress Object.
In the event of an error, the command returns a WLSTException.
stopApplication(appName,[options])
|
Name of the application to stop, as specified in the |
|
|
Optional. Comma-separated list of deployment options, specified as name-value pairs. For a list of valid deployment options, see |
The following example stops the BigApp application.
wls:/offline> progress=stopApplication('BigApp')Stopping the application...
Successfully stopped the application.
The previous example stores the WLSTProgress object returned in a user-defined variable, in this case, progress. You can then use the progress variable to check whether stopApplication command is running. For example:
wls:/mydomain/serverConfig/Servers>progress.isRunning()0
wls:/mydomain/serverConfig/Servers>
For more information about the WLSTProgress object, see WLSTProgress Object.
Command Category: Deployment Commands
Use with WLST: Online
Undeploys an application from the specified servers.
The undeploy command returns a WLSTProgress object that you can access to check the status of the command. For more information about the WLSTProgress object, see WLSTProgress Object. In the event of an error, the command returns a WLSTException.
For more information about deploying and undeploying applications, see Overview of Common Deployment Scenarios in Deploying Applications to WebLogic Server.
undeploy(appName,[targets],[options])
|
Optional. List of the target servers from which the application will be removed. If not specified, defaults to all current targets. |
|
|
Optional. Comma-separated list of deployment options, specified as name-value pairs. For a list of valid deployment options, see |
The following example removes the businessApp application from all target servers. WLST waits 60,000 ms for the process to complete.
wls:/mydomain/serverConfig>undeploy('businessApp', timeout=60000)Undeploying application businessApp ...
<Jul 20, 2005 9:34:15 AM EDT> <Info> <J2EE Deployment SPI> <BEA-260121>
<Initiating undeploy operation for application, businessApp [archive: null],
to AdminServer .>
Completed the undeployment of Application with status
Current Status of your Deployment:
Deployment command type: undeploy