Interoperating with Oracle AQ JMS 7-5
7.2.1.3 Create a JMS Queue or Topic
AQ JMS queues are the JMS administrative resource for both queues and topics. Once the AQ queue table is created, you can create a AQ JMS queue within individual JMS
user schemas using Oracle SQLPLUS. For example:
connect jmsuserjmsuserpwd; The PLSQL procedure for creating a queue or topic has the following form:
dbms_aqadm.create_queue queue_name=userQueue,
queue_table=myQueueTable ;
where:
■
queue_name is the user defined name for the JMS queue.
■
queue_table must point to an existing AQ queue table. For more information on creating queue tables, see CREATE_QUEUE Procedure in
Oracle Database PLSQL Packages and Types Reference.
7.2.1.4 Start the JMS Queue or Topic
Before first use, a AQ JMS queue must be started. Using the JMS user schema, execute the following PLSQL procedure where queue_name represents the AQ JMS queue
name.
connect jmsuser jmsuserpwd dbms_aqadm.start_queuequeue_name=userQueue
For more information on starting queues, see START_QUEUE Procedure in Oracle Database PLSQL Packages and Types Reference.
7.2.2 Configure WebLogic Server
The following sections provide information on how to configure WebLogic Server to interoperate with AQ JMS:
■
Section 7.2.2.1, Configure a WebLogic Data Source
■
Section 7.2.2.2, Configure a JMS System Module
■
Section 7.2.2.3, Configure a JMS Foreign Server
■
Section 7.2.2.4, Configure JMS Foreign Server Connection Factories
■
Section 7.2.2.5, Configure AQ JMS Foreign Server Destinations
7.2.2.1 Configure a WebLogic Data Source
WebLogic Server applications such as MDBs, EJBs, and Web apps that use AQ JMS configure a data source for the Oracle database that provides the AQ JMS service. In
most situations, this data source is dedicated to AQ JMS usage because it uses the JMS user and password to connect to the schema in the database. It does support multiple
queues and topics if they are created in the schema used in the database connection. When configuring your data source:
■
Select the Oracle Thin Driver.
■
Select the driver type based on the type of transactions required for AQ JMS:
–
Select a non-XA based JDBC driver for use with AQ JMS in local transactions.
7-6 Configuring and Managing JMS for Oracle WebLogic Server
– Select a XA based JDBC driver for use with AQ JMS in either in global
transactions or in local transactions.
■
When configuring a data source for non-XA drivers, do not select the Supports Global Transactions option. This release does not support non-XA JDBC
driver data sources with any of the global transaction options such as LLR, JTS, and Emulate Two-Phase Commit. If the global transaction option is selected, the
server instance logs a warning message. Global transactions are supported with XA-based JDBC drivers.
■
Configure the database user name and password in the data source connection pool configuration. Identity-based connection pools are not supported.
See:
■
Configuring JDBC Data Sources in Configuring and Managing JDBC Data Sources for Oracle WebLogic Server.
■
Create JDBC data sources in Oracle WebLogic Server Administration Console Help.
7.2.2.1.1 Data Source Tuning Oracle recommends setting
shrink-frequency-seconds to a small value in Oracle RAC environments. For example: shrink-frequency-seconds=10
In the event of a failed connection, this allows a data source to remove the failed connection. See:
■
JDBC Data Source: Configuration: Connection Pool in Oracle WebLogic Server Administration Console Help.
■
Using WebLogic Server with Oracle RAC in Configuring and Managing JDBC Data Sources for Oracle WebLogic Server.
7.2.2.2 Configure a JMS System Module