Redeploying Applications and Modules In-Place

Redeploying Applications in a Production Environment 8-13 because the redeployed files do not adversely affect active client connections. Table 8.2 describes each type of partial deployment and its effect on deployed applications.

8.5.1 Redeploying Applications and Modules In-Place

To redeploy an entire application or standalone module using the in-place redeployment strategy: 1. If you want to preserve client connections to the application, first take the application offline and verify that no clients are accessing the application. The exact method for taking an application offline depends on the architecture of your WebLogic Server domain. In most cases, a redundant server or cluster is created to host a separate copy of the application, and load balancing hardware or software manages access to both servers or clusters. To take the application offline, the load balancing policies are changed to roll all client connections from one set of servers or clusters to the redundant set. 2. Place the new application deployment files in a suitable location for deployment. Oracle recommends that you store each version of an applications deployment files unique subdirectories. For example, if the currently deployed applications files e.g., SimpleEAR.ear are stored in: myDeploymentsmyApplication91BetaSimpleEAR.ear You would store the updated application files in a new directory, such as: Table 8–2 Partial Redeployment Behavior Scope of Partial Redeployment Redeployment Behavior Recommended Usage Graphics files, static HTML files, JSPs Source files are immediately replaced on-disk and served on the next client request. Safe for production applications. J2EE Modules in an Enterprise application All files are immediately replaced. Java class files and libraries are unloaded from classloaders and replaced with updated files. Use only during scheduled application downtime, or when it is not critical to preserve client connections and in-process work. Deployment plan with dynamic property changes such as tuning parameters The application is updated in-place. If the application is versioned, the plan version is not incremented. Safe for all production environments. Deployment plan with non-dynamic property resource binding changes If the application is versioned, is compatible with production redeployment, and is redeployed, WebLogic Server increments the version identifier and uses the production redeployment strategy to update the application. If the application cannot use production redeployment, you must redeploy the entire application. Safe for versioned applications that are compatible with production redeployment. See Section 8.3, Using Production Redeployment to Update Applications . If the application cannot use production redeployment, update the deployment plan only during scheduled application downtime or when it is not critical to preserve client connections and in-process work. You must redeploy instead of update applications with deployment plans that contain changes to non-dynamic properties. Attempts to update applications with such plans will fail. 8-14 Deploying Applications to Oracle WebLogic Server myDeploymentsmyApplication1.0GASimpleEAR.ear 3. Redeploy the application and specify the updated deployment source files. To redeploy the application on all configured target servers, specify only the deployment name, as in: java weblogic.Deployer -adminurl http:localhost:7001 -user weblogic -password weblogic -redeploy -source myDeploymentsmyApplication1.0GASimpleEAR.ear -name myApp If an application was previously deployed to multiple, non-clustered server instances, you can specify a target list to redeploy the application on only a subset of the target servers, as in: java weblogic.Deployer -adminurl http:localhost:7001 -user weblogic -password weblogic -redeploy -source myDeploymentsmyApplication1.0GASimpleEAR.ear -name myApp -targets myserver1,myserver2 4. If you took the server or cluster hosting the application offline, bring the host servers back online after the redeployment completes. 5. If necessary, restore the load balancing policies of your load balancing hardware or software to migrate clients from the temporary servers back to the online production servers.

8.5.2 Best Practices for Redeploying Applications and Modules In-Place