AQ is Oracle’s Advanced Queuing – a database backed channel. We use AQ Queues a lot when doing integration projects and it always helps to have a local install of SOA Suite with AQ capabilities (i.e. your own DB with AQ Queues etc)
It was hard finding any documentation on configuring Adapters for Oracle SOA Suite on a Weblogic server, so I thought I would put together a little doco explaining how I configured this. It is the same for an Apps Adapter config. Initially this looked a bit different than the old OC4J way of configuring adapters but it really is not all that different.
Weblogic requires a “weblogic-ra.xml” along with the “ra.xml” file in the “META-INF” folder of the RAR file for the adapter. The trickiest part is getting the Web console to apply changes … what I mean is that initially I tried to “Update” an existing “Deployment” of AQAdapter from the Weblogic Admin Console and it blew up … later I found out because the AQAdapter was packaged up in a RAR file (and not exploded on the filesystem) …as a result my changes from the console were not making it through.
The steps below show how I extracted the AQAdapter.rar to AQAdapter folder I created under the $SOA_HOME/soa/connectors/ folder. You can use these steps to configure any adapter (I have personally tested Oracle Apps Adapter – screen shots later)
Before we begin though, read through Oracle’s documentation on AQ and how to create queues and configure etc
Oracle AQ Documentation: http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10231/adptr_aq.htm
Oracle AQ Adapter Properties: http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10231/adptr_propertys.htm#CIHCHGJJ
Here is a good post that explain how to create a user and then create an AQ Queue: http://ora-soa.blogspot.com/2008/06/steps-to-create-aq-queuetopic.html
Steps for Creating an AQ Producer/Consumer and configuring the AQ Adapter:
Lets start from JDeveloper, I created a simple composite that uses an AQAdapter to Enqueue and XML
Have a look at the JCA Properties for the Queue, the JNDI name can be changed to anything you like but must be consistent with what you configure later. For example, I use “eis/AQ/MyAQDatasource” in this example to match the name of the datasource I will be using. Because the AQ Queue is Database backed … the JNDI for the AQ Queue refers to a configuration that contains the JNDI for a XA Datasource. In my example it is “jdbc/MyAQDatasource”
First configure the Adapter weblogic-ra.xml
Goto your Weblogic Server’s host’s file-system, navigate to the connectors directory [$SOA_HOME/soa/connectors/ … in my case it was “g:\Oracle\mw_10.3.5\Oracle_SOA1\soa\connectors\”]
Back-up your AqAdapter.rar
Create a AqAdapter directory and copy the original AqAqapter.rar here
Extract the AqAdapter.rar file in the new directory by doing “jar xf AqAdapter.rar”
Remove the AqAdapter.rar file (so that your directory now has AqAdapter.jar and META-INF folder)
Navigate to the META-INF folder and add your “connection-instance” to the “Weblogic-ra.xml” … basically you are saying the “eis/AQ/MyAQDatasource” JNDI name is configured to have these properties (this is where you put in your XADatasource JNDI)
Add your changes based on what you have in JDeveloper
Save the Weblogic-ra.xml
To configure the AQ Adapter in Weblogic Admin Console
Start the Admin Console
Goto the Deployments
Locate and Uninstall/Delete the “AqAdapter” deployment (don’t worry it will not remove it from your filesystem)
Install the new AQAdapter as show below. Note, the “Deployment Plan” is not created right away … there is a trick to creating it. After the initial Install wizard your need to goto your Adapter configurations and first hit-Enter on a property in the configuration and then click the SAVE button. (see the Red comments in the images below).
Here is a screen shot explaining how the Datasource is used ….