Default Submodule Targeting Sub-module Targeting for Standalone JMS Modules Sub-module Targeting for Application-scoped JMS Modules

Deploying Applications and Modules with weblogic.Deployer 6-9

6.8.1 Targeting Application-Scoped JMS, JDBC, and WLDF Modules

JMS, JDBC, and WLDF application modules can also be included as part of an Enterprise application, as an application-scoped resource module. Application-scoped resource modules can be targeted independently of other EAR modules during deployment, if necessary, by using module-level targeting syntax. For example: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -name myEnterpriseApp -targets myWebAppmyCluster,myJDBCModulemyserver1,myEJBModulemyserver1 -stage -deploy c:\localfiles\myEnterpriseApp.ear

6.8.2 Using Sub-Module Targeting with JMS Application Modules

Certain JMS resources defined within a JMS application module can be further targeted to a JMS Server available on the modules target during deployment. These resources are known as submodules. Certain types of submodule require deployment to a JMS Server, such as: ■ Queues ■ Topics Other submodules can be targeted to JMS Servers as well as WebLogic Server instances and clusters: ■ Connection factories ■ Foreign servers ■ SAF imported destinations ■ Uniform distributed topics ■ Uniform distributed queues To specify submodule targets at deployment or undeployment time, you must use an extended form of the module targeting syntax with the -submoduletargets option to weblogic.Deployer.

6.8.2.1 Default Submodule Targeting

When deploying from the Administration Console, WebLogic Server selects default JMS Server targets for submodules in a JMS application module, as described in Targeting JMS Modules and Subdeployment Resources in Configuring and Managing JMS for Oracle WebLogic Server. When deploying submodule using WLST, you can use the parent modules targets as default targets for JMS resources when all the following conditions are met: ■ The application contains one or more JMS mdoules. ■ There is exactly one JMS server instance associated with the module target. ■ The -submoduletargets option is not specified ■ The defaultSubmoduleTargets option is true. See Deployment Commands in WebLogic Scripting Tool.

6.8.2.2 Sub-module Targeting for Standalone JMS Modules

For a standalone JMS module, the submodule targeting syntax is: -submoduletargets submodule_nametarget_name. For example, to deploy a 6-10 Deploying Applications to Oracle WebLogic Server standalone JMS module on a single server instance, targeting the submodule myQueue to a JMS Server named JMSServer1, enter the command: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -name myJMSModule -targets ManagedServer1 -submoduletargets myQueueJMSServer1 -deploy c:\localfiles\myJMSModule.xml To undeploy the same JMS module, enter the following command, which, assuming myJMSModule contains more than one submodule, will undeploy only the myQueue submodule; all other submodules are unaffected. java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -name myJMSModule -undeploy -submoduletargets myQueueJMSServer1

6.8.2.3 Sub-module Targeting for Application-scoped JMS Modules

For an application-scoped JMS module in an EAR, use the syntax: submodule_ name module_nametarget_name to target a submodule. For example, if the queue in the above example were instead packaged as part of an Enterprise application, you would use the command: java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -name myEnterpriseApp -targets ManagedServer1 -submoduletargets myQueuemyJMSModuleJMSServer1 -deploy c:\localfiles\myEnterpriseApp.ear To undeploy the same JMS module, enter the following command, which, assuming myEnterpriseApp contains more than one submodule, will undeploy only the myQueue submodule; all other submodules are unaffected. java weblogic.Deployer -adminurl http:localhost:7001 -username weblogic -password weblogic -name myEnterpriseApp -undeploy -submoduletargets myQueuemyJMSModuleJMSServer1 For more information on JMS subdeployments, see Targeting JMS Modules and Subdeployment Resources in Configuring and Managing JMS for Oracle WebLogic Server.

6.9 Controlling Deployment File Copying with Staging Modes