9-2 Deploying Applications to Oracle WebLogic Server
java weblogic.Deployer -adminurl http:localhost:7001 -user weblogic -password weblogic -name mymodule -stop -adminmode
By default, WebLogic Server immediately stops the application, without regard to pending HTTP sessions or in-process work. If you want to wait for pending HTTP
sessions to complete their work before stopping the application to client requests and placing it in Administration mode, add the -graceful option:
java weblogic.Deployer -adminurl http:localhost:7001 -user weblogic -password weblogic -name mymodule -stop -adminmode -graceful
To restart an application that was previously stopped, making it available to external clients, use the -start command and specify the deployment name. You do not need
to redeploy a stopped application to make it generally available:
java weblogic.Deployer -adminurl http:localhost:7001 -user weblogic -password weblogic -name mymodule -start
For detailed command information, see Section A, weblogic.Deployer Command-Line
Reference.
9.1.2 Undeploying an Application or Module
After you deploy a new application or standalone module to servers in a domain, the deployment name remains associated with the deployment files you selected. Even
after you stop the deployment on all servers, the files remain available for redeployment using either the Administration Console or weblogic.Deployer
utility.
If you want to remove a deployment name and its associated deployment files from the domain, you must explicitly undeploy the application or standalone module. To
undeploy a deployment unit from the domain using weblogic.Deployer, specify the -undeploy command, as in:
java weblogic.Deployer -adminurl http:localhost:7001 -user weblogic -password weblogic -name mymodule -undeploy
By default, WebLogic Server immediately stops and undeploys the application, interrupting current clients and in-progress work. For a production application, you
may want to undeploy gracefully, allowing current HTTP clients to complete their work before undeploying:
java weblogic.Deployer -adminurl http:localhost:7001 -user weblogic
Note: If you do not explicitly specify an application version with the
-appversion option, the -stop command will only stop the active version of the application. If there are other versions of the application that you also
want to stop or that you want to stop instead or the active version, you must specify them with the -appversion option.
Note:
Using the -undeploy command without the -targets and -submoduletargets flags completely removes the application or
standalone module from all WebLogic Server instances and untargets all JMS sub-module resources.
Managing Deployed Applications 9-3
-password weblogic -name mymodule -undeploy -graceful
Undeploying a deployment unit does not remove the original source files used for deployment. It only removes the deployments configuration from the domain, as well
as any deployment files that WebLogic Server created during deployment for example, files copied with stage deployment mode and files uploaded to the
Administration Server.
If you need to redeploy a deployment unit after undeploying it, you must again identify the deployment files, targets, staging mode, and deployment name using the
instructions in Section 6, Deploying Applications and Modules with
weblogic.Deployer .
9.2 Undeploying Shared Libraries and Packages