Module-Targeting Syntax Targeting Web Application Modules

Deploying Applications and Modules with weblogic.Deployer 6-7 To set the ClusterConstraintsEnabled for the domain when you start the Administration Server, include the appropriate startup argument: ■ -DClusterConstraintsEnabled=true enforces strict cluster deployment for servers in a domain. ■ -DClusterConstraintsEnabled=false ensures that all available cluster members deploy the application or module. Unavailable servers do not prevent successful deployment to the available clustered instances. This corresponds to the default WebLogic Server deployment behavior.

6.7 Using Module-Level Targeting for Deploying an Enterprise Application

An Enterprise application EAR file differs from other deployment units because an EAR can contain other module types WAR and JAR archives. When you deploy an Enterprise application using the Administration Console, you can target all of the archives modules together as a single deployment unit, or target individual modules to different servers, clusters, or virtual hosts. You can also use module-level targeting to deploy only a subset of the modules available in an EAR. This can simplify packaging and distribution of applications by packaging multiple modules in a single, distributable EAR, but targeting only the modules you need to each domain.

6.7.1 Module-Targeting Syntax

To target individual modules in an Enterprise application, use the module_ name target_name syntax. For example: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -name myEnterpriseApp -targets module1myserver1,module2myserver2,module3myserver3 -stage -deploy c:\localfiles\myEnterpriseApp.ear

6.7.2 Targeting Web Application Modules

To target Web application modules that are part of an .ear file, you can use the Web applications context-root name as the module name or specify the web-uri. For example, if the application.xml file for a file, myEnterpriseApp.ear, defines: module web web-urimyweb.warweb-uri context-rootwelcomecontext-root web module Caution: Do not use the ClusterConstraintsEnabled option unless you have an extremely reliable network configuration, and you can guarantee that all cluster members are always available to receive deployment and redeployment requests. With ClusterConstraintsEnabled, WebLogic Server will fail all deployment operations to a cluster if any clustered server is unavailable, even if a single server has been shut down for maintenance. 6-8 Deploying Applications to Oracle WebLogic Server You can deploy only the Web application module by using the context-root name: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -name mywebapplication -targets welcomemyserver1 -stage -deploy c:\localfiles\myEnterpriseApp.ear You can deploy only the Web application module by using the web-uri: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -name mywebapplication -targets myweb.warmyserver1 -stage -deploy c:\localfiles\myEnterpriseApp.ear To deploy a Web application as a default Web application, set the value of the context-root element to . For example, if the application.xml file for a file, myEnterpriseApp.ear, defines: module web web-urimyweb.warweb-uri context-rootcontext-root web module You can deploy only the Web application module by using the context-root name: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -name mywebapplication -targets myserver1 -stage -deploy c:\localfiles\myEnterpriseApp.ear

6.8 Deploying JDBC, JMS, and WLDF Application Modules