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
- Click soa_domain -> Services -> Messaging -> JMS Modules
- Click New button under JMS Modules.
- Enter
Name: myAQJMSModule
Descriptor File Name: myAQJMSModule-jms.xml
- Click Next.
- Select target server, e.g. soa_server1.
- Click Next.
- Click Finish.
Create a JMS Foreign Server
- Click soa_domain -> Services -> Messaging -> JMS Modules
- Click the newly created mySQJMSModule.
- Click New button under Summary of Resources.
- On the Choose the type of resource you want to create screen, select Foreign Server.
- Name Foreign Server: myAQForeignServer
- Click Next.
- Click Finish.
Configure JMS Foreign Server to Point to AQ Database via JNDI
- Click the newly created myAQForeignServer.
- Click Configuration -> General tab. Enter:
JNDI Initial Context Factory: oracle.jms.AQjmsInitialContextFactory
JNDI Properties: datasource=jdbc/myAQDS
- Click Save.
Configure JMS Foreign Server Connection Factories
- Click soa_domain -> Services -> Messaging -> JMS Modules
- Click myAQJMSModule.
- Click myAQForeignServer.
- Click Configuration -> ConnectionFactories tab.
- Click New button. Enter:
Name: myAQCF
Local JNDI Name: jms/aq/myAQCF
Remote JNDI Name: XAQueueConnectionFactory
- 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
- Click soa_domain -> Services -> Messaging -> JMS Modules
- Click myAQJMSModule.
- Click myAQForeignServer.
- Click Configuration -> Destinations tab.
- Click New button. Enter:
Name: myAQTestQ
Local JNDI Name: jms/aq/testQ
Remote JNDI Name: Queues/TEST_QUEUE
- Click OK
Configure Topic
- Click soa_domain -> Services -> Messaging -> JMS Modules
- Click myAQJMSModule.
- Click myAQForeignServer.
- Click Configuration -> Destinations tab.
- Click New button. Enter:
Name: myAQTestTopic
Local JNDI Name: jms/aq/testTopic
Remote JNDI Name: Topics/TEST_TOPIC
- Click OK.
Restart WebLogic Server Instance
Don't forget to restart WebLogic server instance.
EMS connection
1