In Oracle Application Server 10.1.3 ( OC4J) you can use OJMS to expose AQ with JMS (text) Message as type and use it as a normal JMS Queue or Topic in Soa Suite or a Message driven Bean. See my previous blog for more details. With the release of Weblogic 10.3.1 ( WLS FMW11g ) we can do the same with a Foreign JMS Server. Before 10.3.1 we had to make a startup class to achieve this.
First create a Queue and Queue table with SYS.AQ$_JMS_MESSAGE as payload type in your Oracle Database and make sure you enable enqueue /dequeue on this Queue.
In Weblogic we have to create a JMS server and a JMS module.
Create a new JDBC datasource with a schema user which can enqueue or dequeue the just created queue. Use the XA JDBC driver, with this driver you can use global and local transactions. with NON-XA driver you can only use local transactions, this can be problem when you want to use this Queue in Soa Suite.
Select your JMS module in the WLS Console and create a new Foreign Server.
Open the Foreign Server so we can configure this AQ server.
Change JNDI Initial Context Factory to oracle.jms.AQjmsInitialContextFactory and we have to provide the jndi datasource name in the JNDI Properties field, For Example datasource=jdbc/scottDS
Create a JMS connection factory
As local JNDI name you can choose what you like. For Remote you have to choose one of these values. QueueConnectionFactory, TopicConnectionFactory, ConnectionFactory, XAQueueConnectionFactory, XATopicConnectionFactory or XAConnectionFactory
Now we can create a new Destination.
As Local JNDI name you can choose any name but as Remote JNDI it needs to start with Queues or Topics after that add a / with the database queue or topic name.
We are ready to use this AQ Queue in a Soa Suite Composite application. Where we will use the JMS adapter.
Select Oracle Advanced Queuing as OEMS
and select the Foreign Server Destination.
For more Weblogic AQ JMS details see the official documentation.