Changing the Deployment Order for Applications and Standalone Modules Changing the Deployment Order for Modules in an Enterprise Application Ordering Startup Class Execution and Deployment

9-4 Deploying Applications to Oracle WebLogic Server

9.4.1 Changing the Deployment Order for Applications and Standalone Modules

You can change the deployment order for a deployed application or standalone module by setting the AppDeploymentMBean DeploymentOrder attribute in the Administration Console or programmatically using the AppDeploymentMBean. The DeploymentOrder attribute controls the load order of deployments relative to one another—modules with lower DeploymentOrder values deploy before those with higher values. By default, each deployment unit is configured with a Deployment Order value of 100. Deployments with the same Deployment Order value are deployed in alphabetical order using the deployment name. In all cases, applications and standalone modules are deployed after the WebLogic Server instance has initialized dependent subsystems. To view or change the deployment order of deployments using the Administration Console, follow the steps in Change the server deployment order in Oracle WebLogic Server Administration Console Help.

9.4.2 Changing the Deployment Order for Modules in an Enterprise Application

The modules contained in an Enterprise application are deployed in the order in which they are declared in the application.xml deployment descriptor. See Enterprise Application Deployment Descriptor Elements in Developing Applications for Oracle WebLogic Server.

9.4.3 Ordering Startup Class Execution and Deployment

By default WebLogic Server startup classes are run after the server initializes JMS and JDBC services, and after applications and standalone modules have been deployed. If you want to perform startup tasks after JMS and JDBC services are available, but before applications and modules have been activated, you can select the Run Before Application Deployments option in the Administration Console or set the StartupClassMBeans LoadBeforeAppActivation attribute to true. If you want to perform startup tasks before JMS and JDBC services are available, you can select the Run Before Application Activations option in the Administration Console or set the StartupClassMBeans LoadBeforeAppDeployments attribute to true. To select Run Before Applications or Run Before Application Activations in the Administration Console, see Configure startup classes in Oracle WebLogic Server Administration Console Help. The following figure summarizes the time at which WebLogic Server executes startup classes. Note: WebLogic Server security services are always initialized before server resources, applications, and startup classes are deployed. For this reason, you cannot configure custom security providers using startup classes, nor can custom security provider implementations rely on deployed server resources such as JDBC. Note: You cannot change the load order of applications and standalone modules using the weblogic.Deployer utility. Managing Deployed Applications 9-5 Figure 9–1 Startup Class Execution See the full Javadocs for StartupClassMBean for more information.

9.5 Changing the Target List for an Existing Deployment