Deploying Applications to WebLogic Server
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
weblogic.Deployer is a Java-based deployment tool that provides a command-line interface to the WebLogic Server deployment API. weblogic.Deployer
is intended for administrators and developers who want to perform interactive, command-line based deployment operations.
See the WLST Command and Variable Reference for information about performing deployment operations using the WebLogic Scripting Tool (WLST).
The following sections describe the weblogic.Deployer
utility:
To set up your environment to use the weblogic.Deployer utility:
PATH
. You can use the setWLSEnv.sh or setWLSEnv.cmd
script, located in the server/bin subdirectory of the WebLogic Server installation directory, to set the environment.weblogic.Deployer
. See See Using the SSL Protocol to Connect to WebLogic Server from weblogic.Admin in Managing WebLogic Security for instructions about configuring SSL.
java [SSL Arguments] weblogic.Deployer [Connection Arguments]
[User Credentials Arguments]COMMAND-NAME
command-options
[Common Arguments]
Command names and options are not case-sensitive. See Command Reference for detailed syntax and examples of using weblogic.Deployer
commands.
java [
-Dweblogic.security.TrustKeyStore=DemoTrust
]
[-Dweblogic.security.JavaStandardTrustKeystorePassPhrase=
password
]
[-Dweblogic.security.CustomTrustKeyStoreFileName=
filename
-Dweblogic.security.TrustKeystoreType=CustomTrust
[-Dweblogic.security.CustomTrustKeystorePassPhrase=
password
]
]
[-Dweblogic.security.SSL.hostnameVerifier=
classname
]
[-Dweblogic.security.SSL.ignoreHostnameVerification=true ]
weblogic.Deployer
[ User Credentials Arguments ]COMMAND-NAME
command-arguments
If you have enabled the domain-wide administration port, or if you want to secure your administrative request by using some other listen port that is secured by SSL, you must include SSL arguments when you invoke weblogic.Deployer
. Table 7-1 describes all SSL arguments for the weblogic.Deployer
utility.
java [SSL Arguments] weblogic.Deployer
[-adminurlprotocol
://listen_address
:port_number
]
[User Credentials Arguments]COMMAND-NAME
command-options
[Common Arguments]
Most weblogic.Deployer
commands require you to specify the -adminurl
arguments described in Table 7-2 to connect to an Administration Server instance.
Table 7-2 Connection Arguments
|
The To use a port that is not secured by SSL, the format is In order to use an adminurl with the HTTP protocol, you must enable the HTTP tunneling option in the Administration Console. For more information, see Setting Up WebLogic Server for HTTP Tunneling in Designing and Configuring WebLogic Server Environments. For instructions on enabling HTTP tunneling in the Administration Console, see Configure HTTP protocol in Administration Console Online Help. To use a port that is secured by SSL, the format is To connect to the Administration Server via a configured Administration channel, you must specify a valid administration port number: |
java [ SSL Arguments ] weblogic.Deployer [Connection Arguments]
[ { -username username [-password password] } |
[ -userconfigfileconfig-file
[-userkeyfileadmin-key
] ] ]
COMMAND-NAME
command-options
[Common Arguments]
Most weblogic.Deployer
commands require you to specify the arguments in Table 7-3 to provide the user credentials of a WebLogic Server administrator.
Table 7-3 User Credentials Arguments
The Administrator username. If you supply the |
|
The password of the Administrator user. To avoid having the plain text password appear in scripts or in process utilities such as ps, first store the username and encrypted password in a configuration file using the STOREUSERCONFIG command with weblogic.Admin. Omit both the -username and -password options to weblogic.Deployer to use the values stored in the default configuration file. See STOREUSERCONFIG in the weblogic.Admin Command-Line Reference for more information on storing and encrypting passwords. If you want to use a specific configuration file and key file, rather than the default files, use the -userconfigfile and -userkeyfile options to weblogic.Deployer. |
|
Specifies the location of a user configuration file to use for the administrative username and password. Use this option, instead of the |
|
Specifies the location of a user key file to use for encrypting and decrypting the username and password information stored in a user configuration file (the |
The common options described in Table 7-4 can be used with any of the commands described in Command Reference.
Table 7-4 Common options for weblogic.Deployer
The following sections describe the weblogic.Deployer
commands and command options used to perform deployment tasks with WebLogic Server:
Note: weblogic.Deployer
commands are displayed in bold type to distinguish them from command options.
Attempt to cancel a running deployment task.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-canceltask_id
[Common Arguments]
The identifier of the deployment task to cancel. The identifier can be specified by using the |
The following command starts a deployment operation and specifies the task identifier, myDeployment
:
java weblogic.Deployer -adminurl http://localhost:7001
-username weblogic -password weblogic
-deploy ./myapp.ear -id myDeployment
If the deployment task has not yet completed, the following command attempts to cancel the deployment operation:
java weblogic.Deployer -adminurl http://localhost:7001
-username weblogic -password weblogic
-cancel -id myDeployment
Deploys or redeploys an application or module.
Note: The -ACTIVATE
command, an alias for -deploy, is deprecated.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-deploy [[-name]deployment_name
] [-source]file
[-planfile
] [-targetstarget_list
] [-submoduletargetstarget_list
]
[-upload]
[-stage | -nostage | -external_stage]
[-retiretimeoutseconds
]
[-library [-libspecverversion
] [-libimplverversion
]]
[-altappddfile
] [-altwlsappddfile
]
[-securityModel] [-enableSecurityValidation]
[-idtask_id
]
[Common Arguments]
Specifies the deployment name to assign to a newly-deployed application or stand-alone module. Both the
|
|
Specifies the archive file or exploded archive directory to deploy. You can omit the |
|
Specifies a deployment plan to use when deploying the application or module. By default, |
|
Specifies the targets on which to distribute and deploy the application or module. The If you do not specify a target list with the -deploy command, the target defaults to: |
|
Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Transfers the specified deployment files, including deployment plans and alternate deployment descriptors, to the Administration Server. Use this option when you are on a remote machine and you cannot copy the deployment files to the Administration Server by other means. The application files are uploaded to the WebLogic Server Administration Server's upload directory prior to distribution and deployment. |
|
Specifies a staging mode to use when deploying or distributing an application:
|
|
Specifies the number of seconds before WebLogic Server undeploys the currently-running version of this application or module. See Redeploying a New Version of an Application. |
|
Identifies the deployment as a shared J2EE library or optional package. You must include the |
|
Provides the specification version of a J2EE library or optional package. This option can be used only if the library or package does not include a specification version in its manifest file. |
|
Specifies the implementation version of a J2EE library or optional package. This option can be used only if the library or package does not include a implementation version in its manifest file. |
|
Indicates that the deployment operation will use an existing lock, already acquired by the same user, on the domain. This is useful the use is using multiple deployment tools simultaneously and one of the tools has already acquired a lock on the domain configuration. |
|
(Deprecated.) Specifies the name of an alternate J2EE deployment descriptor ( |
|
(Deprecated.) Specifies the name of an alternate WebLogic Server deployment descriptor ( |
|
|
|
Specifies whether or not to enable validation of security data. |
|
Specifies the task identifier of a running deployment task. You can specify an identifier with the -deploy, -redeploy |
See the following sections for examples of using the -deploy command:
Prepares deployment files for deployment by copying deployment files to target servers and validating them.
A distributed application can be quickly started by using the Start command. You can start the application in Administration mode, or make it available to Administration and client requests. While in Administration mode, the application can be accessed only by internal clients via a configured Administration port. External clients cannot access the application.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-distribute [[-name]deployment_name
] [-source]file
[-planfile
] [-targetstarget_list
] [-submoduletargetstarget_list
]
[-upload]
[-stage | -nostage | -external_stage]
[-library [-libspecverversion
] [-libimplverversion
]]
[-altappddfile
] [-altwlsappddfile
]
[-securityModel] [-enableSecurityValidation]
[-idtask_id
]
[Common Arguments]
Specifies the deployment name to assign to the distributed application or module. Both the
|
|
Specifies the archive file or exploded archive directory to distribute. You can omit the |
|
Specifies a deployment plan to distribute with the application or module, used to configure the application. |
|
Specifies the targets on which to distribute the application or module. The If you do not specify a target list with the -deploy command, the target defaults to: |
|
Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Transfers the specified deployment files, including any specified deployment plans, to the Administration Server before distribution. Use this option when you are on a remote machine and you cannot copy the deployment files to the Administration Server by other means. The application files are uploaded to the WebLogic Server Administration Server's upload directory prior to distribution. |
|
Specifies a staging mode to use when deploying or distributing an application:
|
|
Identifies the deployment as a shared J2EE library or optional package. You must include the |
|
Provides the specification version of a J2EE library or optional package. This option can be used only if the library or package does not include a specification version in its manifest file. |
|
Specifies the implementation version of a J2EE library or optional package. This option can be used only if the library or package does not include a implementation version in its manifest file. |
|
(Deprecated.) Specifies the name of an alternate J2EE deployment descriptor ( |
|
(Deprecated.) Specifies the name of an alternate WebLogic Server deployment descriptor ( |
|
|
Specifies the security model to be used for this application. |
Specifies whether or not to enable validation of security data. |
|
Specifies the task identifier of a running deployment task. You can specify an identifier with the -deploy, -redeploy |
The -distribute command operates similar to -deploy, but WebLogic Server does not start the application or module on target servers. See the examples links for the Deploy
command for more information.
Lists the deployment names for applications and stand-alone modules deployed, distributed, or installed to the domain.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-listapps
[Common Arguments]
See Displaying Version Information for Deployed Applications.
Displays the status of deployment tasks currently running in the domain.
java [SSL Arguments] weblogic.Deployer Connection Arguments
[User Credentials Arguments] <-list | -listtask> [task_id
]
[Common Arguments]
The identifier of a deployment task to display. The identifier can be specified by using the |
See Managing Long-Running Deployment Tasks.
Redeploys a running application or part of a running application.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-redeploy [[-name]deployment_name
] {-sourcefile
|filelist
}
[-planfile
] [-targetstarget_list
] [-submoduletargetstarget_list
]
[-upload]
[-delete_files]
[-retiretimeoutseconds
] [-idtask_id
]
[Common Arguments]
Specifies the deployment name of a deployed application or module. The |
|
Specifies the archive file or exploded archive directory to distribute, deploy, or redeploy. When used with the To specify multiple files for a partial redeployment, omit the Note: Use a |
|
Specifies one or more files to redeploy. If the Note: Use a The use of |
|
Specifies a deployment plan to use when distributing, deploying, or redeploying. When redeploying an application, the |
|
Specifies the targets on which to distribute, deploy, or redeploy the application or module. The If you do not specify a target list with the -deploy command, the target defaults to: If you do not specify a target list with the -redeploy command, the application is redeployed on all of its current target servers. |
|
Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Transfers the specified deployment files, including deployment plans and alternate deployment descriptors, to the Administration Server. Use this option when you are on a remote machine and you cannot copy the deployment files to the Administration Server by other means. The application files are uploaded to the WebLogic Server Administration Server's upload directory prior to distribution and deployment. Use the |
|
Removes static files from a server's staging directory.
Note: Because the -delete_files option deletes all specified files or, if you specify a directory but do not specify files within the directory, all files in the specified directory, BEA recommends that you use caution when using the delete_files option and that you do not use the delete_files option in production environments. |
|
Specifies the number of seconds before WebLogic Server undeploys the currently-running version of this application or module. See Redeploying a New Version of an Application. |
|
Specifies the task identifier of a running deployment task. You can specify an identifier with the -deploy, -redeploy |
See the following sections for examples of using the -redeploy command:
Makes a stopped (inactive) application available to clients on target servers. -start does not redistribute deployment files to target servers. Optionally, with the -adminmode
option, starts the application in Administration mode, which makes it available only via a configured Administration channel. In order to issue a -start
command, the files must already be available via an earlier -deploy or -distribute command.
Note: The -activate
command, an alias for -start, is deprecated.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-start [-adminmode] [-name]deployment_name
[-appversionversion
] [-planversionversion
]
[-targetstarget_list
] [-submoduletargetstarget_list
]
[-retiretimeoutseconds
]
[-idtask_id
]
[Common Arguments]
Indicates that the application should start in Administration mode, not Production mode (which is the default). |
|
Specifies the deployment name of a deployed application or module. The |
|
The version of the deployment plan to use when starting the application. |
|
Specifies the targets on which to The If you do not specify a target list with the -deploy command, the target defaults to: If you do not specify a target list with the -redeploy or -start commands, the command is performed on all of the application's current targets. |
|
Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Specifies the number of seconds before WebLogic Server undeploys the currently-running version of this application or module. See Redeploying a New Version of an Application. |
|
Specifies the task identifier of a running deployment task. You can specify an identifier with the -distribute, |
See the following sections for examples of using the -start command:
Makes an application inactive and unavailable administration and client requests. All of the application's staged files remain available on target servers for subsequent -start, -deploy, -redeploy, or -undeploy actions. You can optionally choose to stop the application only to client requests by placing it in Administration mode with the -adminmode option. While in Administration mode, the application be accessed only via a configured Administration channel.
Note: The -deactivate command, an alias for -stop, is deprecated.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-stop [-adminmode] [-name]deployment_name
[-appversionversion
] [-planversionversion
]
[-targetstarget_list
] [-submoduletargetstarget_list
]
[-ignoresessions] [-graceful]
[-idtask_id
]
[Common Arguments]
Indicates that a running application should switch to Administration mode and accept only Administration requests via a configured Administration channel. If this option is not specified, the running application is stopped and cannot accept Administration or client requests until is it restarted. |
|
Specifies the deployment name of a deployed application or module. The |
|
Specifies the targets on which to -distribute, -deploy, -redeploy, -start, or -stop the application or module. The If you do not specify a target list with the -deploy command, the target defaults to: If you do not specify a target list with the -redeploy, -start, or -stop commands, the command is performed on all of the application's current targets. |
|
Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Stops the application after existing HTTP clients have completed their work. If you do not specify the |
|
This option immediately places the application into Administration mode without waiting for current HTTP sessions to complete. |
|
Specifies the task identifier of a running deployment task. You can specify an identifier with the -distribute, -deploy, -redeploy, -start, -stop, or -undeploy commands, and use it later as an argument to the -cancel or -list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one. |
See the following sections for examples of using the -stop command, see Stopping an Application to Restrict Client Access.
Stops the deployment unit and removes staged files from target servers.
Note: The -REMOVE
command, an alias for -undeploy, is deprecated.
Warning: When you undeploy an application that contains application-scoped resources, the resources are deleted along with the application, which can potentially cause abandoned transactions or lost messages as a result of deleted JMS destinations. For more information, see Unregister Resource Grace Period in Programmikng WebLogic JTA.
Warning: You should only undeploy applications that you are certain you want to completely remove; to temporarily stop client access to applications, use the -stop command, described in weblogic.Deployer Command-Line Reference, instead.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-undeploy [-name]deployment_name
[-appversionversion
] [-planversionversion
]
[-targetstarget_list
] [-submoduletargetstarget_list
]
[-graceful] [-ignoresessions]
[-idtask_id
]
[Common Arguments]
Specifies the deployment name of a deployed application or module. The |
|
Specifies the targets from which the application or module are undeployed. Note: Any target not included in the target list is not removed. The target_list argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1>). This enables you to undeploy different modules of an Enterprise Application from different servers or clusters. |
|
Specifies the JMS resources to be undeployed. Note: Any sub-module target not included in the target list is not removed. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS |
|
Stops the application after existing HTTP clients have completed their work. If you do not specify the |
|
Immediately stops and undeploys the application without waiting for current HTTP sessions to complete. |
|
Specifies the task identifier of a running deployment task. You can specify an identifier with the -distribute, |
See the following sections for examples of using the -undeploy command:
Updates an application's deployment plan by redistributing the plan files and reconfiguring the application based on the new plan contents.
Note: -update cannot be used to update an application's resource bindings. To update the resource bindings for an application, you must use the Redeploy command.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-update -plan deployment_plan [-name]deployment_name
[-appversionversion
] [-planversionversion
]
[-targetstarget_list
] [-submoduletargetstarget_list
]
[-upload] [-idtask_id
]
[Common Arguments]
Identifies the deployment plan to use for updating the application's configuration. The specified deployment plan must be valid for the application's target servers. For example, the plan cannot contain null variables for required resources unless those resources were previously defined in the associated desrciptor. Update operations update only those descriptors for which there is a changed, not null value in the deployment plan. If a plan that is used by an update operation contains null variables, the current values in the corresponding descriptors are not updated. |
|
Specifies the deployment name of a deployed application or module. The |
|
Specifies the targets on which to -distribute, -deploy, -redeploy, -undeploy, -start, or -stop the application or module. The If you do not specify a target list with the -deploy command, the target defaults to: If you do not specify a target list with the -redeploy, -undeploy, -start, or -stop commands, the command is performed on all of the application's current targets. |
|
Specifies JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Uploads a new deployment plan to the Administration Server before updating the application. |
|
Specifies the task identifier of a running deployment task. You can specify an identifier with the -distribute, -deploy, -redeploy, -update, -start, -stop, or -undeploy commands, and use it later as an argument to the -cancel or -list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one. |
See Updating an Application to Use a Different Deployment Plan
This section demonstrates an application's config.xml
file and the corresponding weblogic.Deployer
command to deploy the application.
mycluster
is a cluster nameD1C2S1
and D1C2S2
are server namesRemoteJMSServer1
and RemoteJMSServer2
are JMS server namesThe application's config.xml
file would contain:
<AppDeployment
Name="dd-remote-cluster"
SourcePath="./udd-debug-deployment-on-remote-cluster-jms.xml"
Targets="mycluster">
<SubDeployment Name="RemoteCluster" Targets="mycluster"/>
<SubDeployment Name="D1C2S2" Targets="D1C2S2"/>
<SubDeployment Name="RemoteClusterServers" Targets="D1C2S1,D1C2S2"/>
<SubDeployment Name="RemoteClusterJMSServers"
Targets="RemoteJMSServer1,RemoteJMSServer2"/>
<SubDeployment Name="RemoteQueue1" Targets="RemoteJMSServer1"/>
</AppDeployment>
The weblogic.Deployer
-deploy
command to deploy the application would be:
java weblogic.Deployer -adminurl t3://MySystem:10000 -username system
-password system -name dd-remote-cluster
-deploy "config\jms\udd-debug-deployment-on-remote-cluster-jms.xml"
-targets mycluster -submoduletargets RemoteCluster@mycluster,
D1C2S2@D1C2S2, RemoteClusterServers@D1C2S1,
RemoteClusterServers@D1C2S2, RemoteClusterJMSServers@RemoteJMSServer1,
RemoteClusterJMSServers@RemoteJMSServer2, RemoteQueue1@RemoteJMSServer1
![]() ![]() |
![]() |
![]() |