WebLogic: Setup AQ JMS

Contents

WebLogic: Setup AQ JMS

Configure WebLogic Server

Configure a WebLogic Data Source

Create a Dedicated JMS System Module

Create a JMS Foreign Server

Configure JMS Foreign Server to Point to AQ Database via JNDI

Configure JMS Foreign Server Connection Factories

Other Remote JNDI Names for AQ JMS Connection Factories

Configure AQ JMS Foreign Server Destinations

Configure Queue

Configure Topic

Restart WebLogic Server Instance

EMS connection

Before connecting to AQ though Weblogic foreign JNDI, by default we assume that you have finished the Oracle AQ configuration on DB side, and you have created a JMS server on Weblogic.

Configure WebLogic Server

Configure a WebLogic Data Source

Follow this post to create a data source with following properties:

Name: myAQDS

JNDI Name: jdbc/myAQDS

Database Type: Oracle

Database Driver: Oracle's Driver (Thin XA) for Service connections;

Create a Dedicated JMS System Module

  1. Click soa_domain -> Services -> Messaging -> JMS Modules
  2. Click New button under JMS Modules.
  3. Enter

Name: myAQJMSModule

Descriptor File Name: myAQJMSModule-jms.xml

  1. Click Next.
  2. Select target server, e.g. soa_server1.
  3. Click Next.
  4. Click Finish.

Create a JMS Foreign Server

  1. Click soa_domain -> Services -> Messaging -> JMS Modules
  2. Click the newly created mySQJMSModule.
  3. Click New button under Summary of Resources.
  4. On the Choose the type of resource you want to create screen, select Foreign Server.
  5. Name Foreign Server: myAQForeignServer
  6. Click Next.
  7. Click Finish.

Configure JMS Foreign Server to Point to AQ Database via JNDI

  1. Click the newly created myAQForeignServer.
  2. Click Configuration -> General tab. Enter:

JNDI Initial Context Factory: oracle.jms.AQjmsInitialContextFactory

JNDI Properties: datasource=jdbc/myAQDS

  1. Click Save.

Configure JMS Foreign Server Connection Factories

  1. Click soa_domain -> Services -> Messaging -> JMS Modules
  2. Click myAQJMSModule.
  3. Click myAQForeignServer.
  4. Click Configuration -> ConnectionFactories tab.
  5. Click New button. Enter:

Name: myAQCF

Local JNDI Name: jms/aq/myAQCF

Remote JNDI Name: XAQueueConnectionFactory

  1. Click OK.

Other Remote JNDI Names for AQ JMS Connection Factories

* ConnectionFactory

- javax.jms.ConnectionFactory

* QueueConnectionFactory

- javax.jms.QueueConnectionFactory

* TopicConnectionFactory

- javax.jms.TopicConnectionFactory

* XAConnectionFactory

- javax.jms.XQConnectionFactory

* XAQueueConnectionFactory

- javax.jms.XAQueueConnectionFactory

* XATopicConnectionFactory

- javax.jms.XATopicConnectionFactory

Configure AQ JMS Foreign Server Destinations

Remote JNDI Names are mapped as follows:

For queue: Queues/queue_name

For Topics: Topics/topic_name

Configure Queue

  1. Click soa_domain -> Services -> Messaging -> JMS Modules
  2. Click myAQJMSModule.
  3. Click myAQForeignServer.
  4. Click Configuration -> Destinations tab.
  5. Click New button. Enter:

Name: myAQTestQ

Local JNDI Name: jms/aq/testQ

Remote JNDI Name: Queues/TEST_QUEUE

  1. Click OK

Configure Topic

  1. Click soa_domain -> Services -> Messaging -> JMS Modules
  2. Click myAQJMSModule.
  3. Click myAQForeignServer.
  4. Click Configuration -> Destinations tab.
  5. Click New button. Enter:

Name: myAQTestTopic

Local JNDI Name: jms/aq/testTopic

Remote JNDI Name: Topics/TEST_TOPIC

  1. Click OK.

Restart WebLogic Server Instance

Don't forget to restart WebLogic server instance.

EMS connection

1