Deploying to a Single-Server Domain Deploying an Application with a Deployment Plan

Deploying Applications and Modules with weblogic.Deployer 6-3 java weblogic.Deployer -adminurl http:test:7001 -username weblogic -password weblogic -deploy c:\localfiles\myapp.ear -plan c:\localfiles\productionEnvPlan.xml 2. If the administrator or developer uses WebLogic Portal on the Managed Server and saves some configuration changes to the myapp.ear application. When the application is saved, WebLogic Portal updates the application using the following: java weblogic.Deployer -adminurl http:test:7001 -username weblogic -password weblogic -update -name myapp.ear -upload -plan c:\localfiles\nuPlan.xml 3. The application and deployment plan file from the remote machine are uploaded to the Administration Server upload directory. The deployment is updated and the configuration uses the deployment plan at c:\domain\servers\adminServerName\upload\plan\nuPlan.xml. At this point, an administrator or developer expecting the behavior derived from the application c:\localfiles\myapp.ear and deployment plan c:\localfiles\productionEnvPlan.xml can easily become confused. If the administrator or developer: ■ Reviews the application and deployment plan files, the files have not changed. New behaviors appear to be unexplained. ■ Makes changes to the c:\localfiles\myapp.ear application file or c:\localfiles\productionEnvPlan.xml deployment plan file xml, the deployment configuration changes in the upload directory are at risk of being lost.

6.3 Deploying to a Single-Server Domain

A single-server WebLogic Server domain, consisting only of an Administration Server, represents the simplest scenario in which to deploy an application or module. If you are deploying files that reside on the same machine as the domain, use the -deploy command and identify the file location, with connection arguments for the Administration Server. For example: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -deploy c:\localfiles\myapp.ear In the above command, WebLogic Server creates a default deployment name of myapp, as described in Section 3.2, Understanding Default Deployment Names , because myapp is the name of the deployment file without the extension. If you want to specify a non-default deployment name, use the -name option, as in: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -deploy -name myTestApplication c:\localfiles\myapp.ear To deploy an application or module to multiple targets, see Section 6.6, Targeting Deployments to Servers, Clusters, and Virtual Hosts

6.4 Deploying an Application with a Deployment Plan

When you use weblogic.Deployer to deploy an application, the deployment plan and WebLogic Server deployment descriptors must define a valid configuration for the target environment, or the deployment fails. This means you cannot use weblogic.Deployer with a deployment plan that defines null variables for an applications required resource bindings. 6-4 Deploying Applications to Oracle WebLogic Server To deploy an application and deployment plan using weblogic.Deployer, include the -plan option with the -deploy command, as in: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -deploy -name myTestDeployment -source myDeploymentsmyApplication.ear -targets myCluster -stage -plan myDeploymentsmyAppPlan.xml If you are deploying from an application root directory and the deployment plan is located in the plan subdirectory, you still need to identify both the actual deployment source files the plan to use for deployment, as in: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -deploy -name myTestDeployment -source myDeploymentsinstalledAppsmyApplicationappmyApplication.ear -targets myCluster -stage -plan myDeploymentsinstalledAppsmyApplicationplanplan.xml When you deploy or distribute an application with a deployment plan, the deployment plan and any generated deployment descriptors are copied to the staging directories of target servers along with the application source files.

6.5 Deploying an Application That Looks Up System Resources from JNDI During preStart