Configuring JMS Application Modules for Deployment 5-7
5.4.2 Creating Standalone JMS Application Modules
You can create JMS standalone modules using an enterprise-level IDE or another development tool that supports editing XML descriptor files. You then deploy and
manage standalone modules using WebLogic Server tools, such as the weblogic.Deployer utility or the WebLogic Administration Console.
5.4.2.1 Standalone JMS Application Module Requirements
A standalone JMS module must meet the following criteria:
■
Conforms to the http:xmlns.oracle.comweblogicweblogic-jms1.0weblogic-jm
s.xsd schema
■
Uses -jms.xml as the file suffix for example, MyJMSDescriptor-jms.xml
■
Uses a name that is unique within the WebLogic domain cannot conflict with JMS system modules
5.4.2.2 Main Steps for Creating Standalone JMS Application Modules
Follow these steps to configure a standalone JMS module:
1. If necessary, create a JMS server to target the JMS module to, as explained in
Configure JMS servers in the Oracle WebLogic Server Administration Console Help.
2. Create a JMS system module and configure the necessary resources, such as
queues or topics, as described in Configure JMS system modules and add JMS resources in the Oracle WebLogic Server Administration Console Help.
3. The system module is saved in config\jms subdirectory of the domain
directory, with a -jms.xml suffix.
4. Copy the system module to a new location and then:
a. Give the module a unique name within the domain namespace.
b. To make the module globally available, uniquely rename the JNDI-Name
attributes of the resources in the module.
c. If necessary, modify any other tunable values, such as destination thresholds
or connection factory flow control parameters.
5. Deploy the module, as described in
Section 5.4.4, Deploying Standalone JMS Application Modules.
5.4.3 Sample of a Simple Standalone JMS Application Module
The following code snippet is an example of simple standalone JMS module. weblogic-jms xmlns=http:xmlns.oracle.comweblogicweblogic-jms
connection-factory name=exampleStandAloneCF jndi-nameexampleStandAloneCFjndi-name
connection-factory
Note: You can create a JMS application module using the
Administration Console, then copy the module as a template for use in your applications, using -jms.xml as the file suffix. You must also
change the Name and JNDI-Name elements of the module before deploying it with your application to avoid a naming conflict in the
namespace.
5-8 Configuring and Managing JMS for Oracle WebLogic Server
queue name=ExampleStandAloneQueue jndi-nameexampleStandAloneQueuejndi-name
queue weblogic-jms
5.4.4 Deploying Standalone JMS Application Modules
The command-line for using the weblogic.Deployer utility to deploy a standalone JMS module using the example above would be:
java weblogic.Deployer -adminurl http:localhost:7001 -user weblogic -password weblogic \
-name ExampleStandAloneJMS \ -targets examplesServer \
-submoduletargets ExampleStandaloneQueueexamplesJMSServer,ExampleStandaloneCFexamplesServer \
-deploy ExampleStandAloneJMSModule-jms.xml
For information about deploying standalone JMS modules, see Deploying JDBC, JMS, and WLDF Application Modules in Deploying Applications to Oracle WebLogic Server.
When you deploy a standalone JMS module, an app-deployment entry is added to the config.xml file for the domain. For example:
app-deployment namestandalone-examples-jmsname
targetMedRecServertarget module-typejmsmodule-type
source-pathC:\modules\standalone-examples-jms.xmlsource-path sub-deployment
... sub-deployment
sub-deployment ...
sub-deployment app-deployment
Note that the source-path for the module can be an absolute path or it can be a relative path from the domain directory. This differs from the
descriptor-file-name path for a system resource module, which is relative to the domain
\config directory.
5.4.5 Tuning Standalone JMS Application Modules