Deploying Applications to WebLogic Server
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The following sections describe how to export an application's WebLogic Server deployment configuration to a custom deployment plan, which helps administrators easily deploy the application into non-development environments:
Exporting an application's deployment configuration is the process of creating a custom deployment plan that administrators can use for deploying the application into new WebLogic Server environments. You distribute both the application deployment files and the custom deployment plan to deployers (for example, testing, staging, or production administrators) who use the deployment plan as a blueprint for configuring the application for their environment.
An administrator can install both the application and the custom deployment plan using the Administration Console, which validates the deployment plan and indicates when specific configuration properties need to be filled in before deployment.
See the Deployment Plan Reference and Schema for more information about deployment plans.
The primary goals in exporting a deployment configuration are:
BEA WebLogic Server provides the following tools to help you export an application's deployment configuration:
weblogic.PlanGenerator
creates a template deployment plan with null variables for selected categories of WebLogic Server deployment descriptors. This tool is recommended if you are beginning the export process and you want to create a template deployment plan with null variables for an entire class of deployment descriptors (see Understanding Deployment Property Classifications). You typically need to manually modify the deployment plan created by weblogic.PlanGenerator
, either manually or using the Administration Console, to delete extraneous variable definitions or add variables for individual properties.weblogic.PlanGenerator
, because it allows you to interactively add or edit individual deployment descriptor properties in the plan, rather than export entire categories of descriptor properties.
Each WebLogic Server deployment descriptor property (for all J2EE module descriptors as well as JDBC, JMS, and WLDF application modules) is formally classified into one of the following four categories:
ejb-name
property is categorized as non-configurable, because changing its value also requires changing the EJB application code.These categories are used during the configuration export process to select properties to expose as variables in the deployment plan. For example, you can generate a new deployment plan containing variable definitions for all properties tagged as "dependencies" in an application's WebLogic Server deployment descriptors. The variables can then be easily changed by an administrator deploying the application to an environment having different resource names.
All changeable descriptor properties (dependency, declaration, and configurable properties) are further classified as either dynamic or non-dynamic properties. Dynamic properties can be changed in a deployed application without requiring you to redeploy for the changes to take effect. Non-dynamic properties can be changed but require redeployment for the changes to take effect. The Administration Console identifies non-dynamic properties as a reminder for when redeployment is necessary.
Exporting an application's deployment configuration typically involves the following procedures:
The sections that follow describe each procedure in detail.
BEA recommends placing application files into an application installation directory before exporting the deployment configuration. When using an installation directory, generated configuration files, such as the deployment plan, are automatically copied to the \plan
subdirectory during export.
To create an application installation directory:
mkdir c:\exportapps\myApplication
mkdir c:\exportapps\myApplication\app
mkdir c:\exportapps\myApplication\plan
\app
subdirectory. The application can be either in archive or exploded archive form:cp -r c:\dev\myApplication c:\exportapps\myApplication\app
If you choose not to use an installation directory when exporting an application, BEA recommends using the -plan
option to weblogic.PlanGenerator
to specify the location and filename of the generated plan. By default, weblogic.PlanGenerator
stores generated files in the TEMP
/weblogic-install/
application_name/config directory, where TEMP
is the temporary directory for your environment. For Windows platforms, this means generated configuration files are stored in C:\Documents and Settings\
username
\Local Settings\Temp\weblogic\install\myApplication.ear\config
. Use the -plan
option to place generated files in a known location.
The weblogic.PlanGenerator
tool provides a quick and easy way to generate a template deployment plan with null variables for an entire category of deployment descriptors. BEA recommends using weblogic.PlanGenerator
to generate a new deployment plan with null variables for all of an application's dependencies. This ensures that all global resources required for an application can be easily configured by administrators who must deploy the application in a new environment.
When using an application staged in an installation root directory, the basic syntax for using weblogic.PlanGenerator
is:
java weblogic.PlanGenerator -root
install_root
category
category
specifies the category of WebLogic Server deployment descriptors for which you want to create variables. (See Understanding Deployment Property Classifications for a description of each category.) For the purposes of generating a template deployment plan, you should usually use only the -dependencies
option, which is the default option, as this limits variables to external resources required by the application.
Note: The -dependencies
option creates null variables for every possible dynamically-configurable deployment property, which can result in a large number of variable definitions that may not be required for your application. The -declarations
option is generally not required, because declaration properties are typically associated with the basic functioning of the application and should not be changed before deployment to a new environment.
java weblogic.PlanGenerator -root c:\exportapps\myApplication -dependencies
java weblogic.PlanGenerator -root c:\exportapps\myApplication
With the above commands, which are synonymous because -dependencies
is the default option so you are not required to specify it in your weblogic.PlanGenerator
command, weblogic.PlanGenerator
inspects all J2EE deployment descriptors in the selected application, and creates a deployment plan with null variables for all relevant WebLogic Server deployment properties that configure external resources for the application. Using this template deployment plan, an administrator using the Administration Console would be directed to assign valid resource names for each null variable before the application could be deployed.
The template deployment plan generated in Generating a Template Deployment Plan using weblogic.PlanGenerator contains only those deployment properties that resolve external dependencies for the application. You will generally customize the template plan to add one or more WebLogic Server tuning properties for the application. The Administration Console enables you to easily add deployment plan variables for individual deployment descriptor properties as needed. To customize a deployment plan using the Administration Console:
To modify a deployment configuration using the Administration Console, you must first install the application and existing deployment plan as described in Install applications and modules in Administration Console Online Help.
After installing the exported application, follow the steps in Update a deployment plan in Administration Console Online Help to add new tuning properties to the deployment plan:
When you modify an application's deployment configuration using the Administration Console, your changes to deployment properties are stored in a WebLogic Server deployment plan and/or in generated WebLogic Server deployment descriptor files. If you modified only those deployment properties that were already defined as variables in the application's deployment plan, your changes are written back to a new version of the plan file. If you modified deployment properties that were not specified in the deployment plan, new variables are added to the plan.
When you configure an application that was installed from an installation directory, the Administration Console stores generated configuration files in the plan
subdirectory by default.
In some cases you may need to edit a custom deployment plan manually, using a text editor. This may be necessary for the following reasons:
Note: You cannot use the Administration Console to remove variable definitions from the deployment plan or assign a null value for a deployment property.
See Deployment Plan Schema before manually editing deployment plan entries.
The variable-definition
stanza in a deployment plan defines the names and values of variables used for overriding WebLogic Server deployment descriptor properties. The module-override
element may contain one or more variable-assignment
elements that define where a variable is applied to a given deployment descriptor. To remove a variable from a deployment plan, use a text editor to delete:
variable
definition from the variable-definition
stanzavariable-assignment
elements that reference the deleted variable.To assign a null value to an existing variable definition, simply change any text value that is present in the value
subelement in the variable
element to <value xsi:nil="true"></value> where the xsi namespace is defined as: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
. For example, change:
...
<variable-definition>
<variable>
<name>SessionDescriptor_InvalidationIntervalSecs_11029744771850</name>
<value>80</value>
</variable>
</variable-definition>
...
...
<variable-definition>
<variable>
<name>SessionDescriptor_InvalidationIntervalSecs_11029744771850</name>
<value xsi:nil="true"></value>
</variable>
</variable-definition>
...
The Administration Console automatically validates the deployment configuration for a newly-installed application or module. To validate a custom deployment plan that you have created during the export process:
plan.xml
in the plan
subdirectory of an installation directory, if one is available.
Keep in mind these best practices when exporting an application's deployment configuration:
weblogic.PlanGenerator
only for exporting resource dependencies. Using weblogic.PlanGenerator
to export other categories of deployment descriptor properties generally results in too many variables in the deployment plan.weblogic.PlanGenerator
allow you to remove variables from a plan or set null values for variables. Use a text editor when necessary to complete these tasks.
![]() ![]() |
![]() |
![]() |