Understanding Application Deployment Descriptors Understanding WebLogic Server Deployment Plans

4-2 Deploying Applications to Oracle WebLogic Server 1. Development configuration—During development, a programmer creates J2EE deployment descriptors for an application or module. The programmer also creates WebLogic Server deployment descriptors to configure the application for deployment to a WebLogic Server development environment. See Developing Applications for Oracle WebLogic Server. 2. Export configuration—Before releasing an application from development, a programmer or designer may optionally export the applications deployment configuration to a WebLogic Server deployment plan. Exporting a configuration creates deployment plan variables for all or a subset of the deployment properties already defined by a developer in the applications WebLogic Server deployment descriptor files. See Chapter 5, Exporting an Application for Deployment to New Environments . Exporting an application helps deployers in other areas of the organization such as engineers on the QA team or production Administrators easily deploy the application to environments that differ from the programmers development environment. The ideal deployment plan includes all of the properties that a deployer needs to change before deploying the application in a new environment. 3. Deployment-time configuration—An Administrator or deployer configures the application before deploying the application into the target environment. Deployment-time configuration may use: ■ The same WebLogic Server deployment configuration and deployment plan created during development. ■ Modified versions of the development configuration and deployment plan. ■ A custom deployment plan that the deployer previously created for the environment, depending on the deployment configuration workflow for your organization. See Chapter 6, Deploying Applications and Modules with weblogic.Deployer . 4. Post-deployment configuration—After an application has been deployed to a target environment, an Administrator or deployer can reconfigure the application by redeploying with a new deployment plan or by using the Administration Console to update and redeploy an existing deployment plan. See Chapter 8, Redeploying Applications in a Production Environment and Chapter 9, Managing Deployed Applications . Because deployment configuration is performed by different people at different points in the life cycle of an application, administrators, deployers, and developers need to work together to create a repeatable configuration workflow for their organization. See Section 4.2, Typical Deployment Configuration Workflows .

4.1.2 Understanding Application Deployment Descriptors

The basic deployment configuration for an application is defined in multiple XML documents, known as deployment descriptors, that are included as part of the application archive file that you receive for deployment. Deployment descriptor files fall into two separate categories: Note: Applications developed outside of the WebLogic Server development environment for example, a sample or third-party J2EE application such as PetStore may include only J2EE descriptors. Configuring Applications for Production Deployment 4-3 ■ J2EE deployment descriptors define the fundamental organization and behavior of a J2EE application or module, regardless of where the application is deployed. Each J2EE application and module requires a specific J2EE deployment descriptor as defined in the Java EE 5 specification. ■ WebLogic Server deployment descriptors define the resource dependencies and tuning parameters that an application uses in a specific WebLogic Server environment. For the purposes of a production deployment, you should treat both the J2EE and WebLogic Server deployment descriptors as part of the applications source code, which is owned by your development team. Do not edit application deployment descriptors in order to configure an application for deployment to a production environment. Instead, persist configuration changes into a WebLogic Server deployment plan, which is described in the next section.

4.1.3 Understanding WebLogic Server Deployment Plans

As previously discussed, a WebLogic Server deployment plan is an optional XML document that you use to configure an application for deployment to a specific WebLogic Server environment. A deployment plan specifies setting deployment property values that would normally be defined in an applications WebLogic Server deployment descriptors, or overrides property values that are already defined in a WebLogic Server deployment descriptor. When exporting an application, the deployment plan typically acts to override selected properties in the WebLogic Server deployment descriptors you created during development. Typically, deployment plans are created by developers along with the associated application files, then distributed to the Administrator or another deployer, who updates the plan for a particular environment such as staging, testing, or production. The deployment plan is stored outside of an application archive or exploded archive directory. As a best practice, Oracle recommends storing each deployment plan for a single application in its own plan subdirectory of the applications root directory See Section 3.5, Creating an Application Installation Directory . Deployment plans help the Administrator easily modify an applications WebLogic Server configuration for deployment to multiple, differing WebLogic Server environments without modifying the deployment descriptor files included in the application archive. Configuration changes are applied by adding or changing variables in the deployment plan, which define both the location of the WebLogic Server descriptor properties to change and the value to assign to those properties. Administrators deploying an application need only change the deployment plan—the original deployment files and deployment descriptors remain unchanged as shown in Figure 4–1 . To determine the deployment configuration workflow for your environment, see Section 4.2, Typical Deployment Configuration Workflows . Note: You cannot use deployment plans with applications using DTD-based deployment descriptors. You must upgrade the application to use schema-based descriptors. 4-4 Deploying Applications to Oracle WebLogic Server Figure 4–1 WebLogic Server Deployment Plan

4.1.4 Goals for Production Deployment Configuration