Monday, March 16, 2009

AQ-JMS on SOA Suite10.1.3.4 on WebLogic9.2

There are 3 options in SOA Suite on Weblogic for messaging
-AQ Adapter
-AQ with JMS
-JMS Providers
--OC4J JMS Provider (only on OC4J)
--Weblogic JMS Provider
--Any other 3rd party JMS provider

Aq is the native queuing mechanism in Oracle, which uses database to create queue tables and queues/topics.

Other JMS Providers primarily use a in-memory/file based approach to create queues and topics.

To create Aq/JMS adapters on SOA Suite on Weblogic, here are the steps -

AQ/JMS basically means AQ queues with JMS message type. AQ/JMS supports SYS.AQ$_JMS_TEXT_MESSAGE, SYS.AQ$_JMS_BYTES_MESSAGE, SYS.AQ$_JMS_STREAM_MESSAG, SYS.AQ$_JMS_MAP_MESSAGE, SYS.AQ$_JMS_MESSAGE.

For the sqls to create the queue tables/ queues here is a reference

Next what we realized AQ/JMS is not supported on weblogic yet, so we had to use a custom code created by Robert Patrick

The code is also available here

Basically - we need to create a Weblogic startup class AQJMSStartupClass.jar, and use one property file, couple of user credential files, and a couple of jars (aqapi13.jar and ojdbc14.jar), we followed the readme file and created the required files.

Next we created a weblogic startup class with the necessary parameters, and restarted the soa server, and it basically used the startup class to create the AQJMS JNDI entries for QueueConnectionFactories, Queue etc.

Then we created a JMS Adapter entry in weblogc-ra.xml to use the AQJMS_QueueConnectionFactory. Used this JMS Adapter JNDI name in the bpel wsdl.

This just worked great, we have seen some AQ related errors in log, which I will cover in next post.

update on Aug/19/09
The AQ realted error like 'Cannot delist resource when transaction state is committed' got fixed after applying MLR#8

No comments: