Oracle SOA Suite 11g – Configure AQ Adapter Resource 1
AQAdapters (Same type of config works for Apps adapter)
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)
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”
Steps:
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).
This is the tricky part … click on a property, then press the “ENTER” key, then click on the “SAVE” button
Make sure your DataSource Exists
Make sure your DataSource Exists
Here is a screen shot explaining how the Datasource is used ….
Source: http://techiecook.wordpress.com/2011/07/13/oracle-soa-suite-11g-configure-resource-adapters-on-weblogic-server-aqadapter/
No comments:
Post a Comment