How to run the HelloWorld OAQ quickstart using a jms-jca provider and SOA5?
jlentz Jun 28, 2010 4:32 PMThe HelloWorld for OAQ quickstart works when using a jms-provider and the 6 jar files required for the quickstart (aqapi13.jar, asm.jar, cglib-2.1_2jboss.jar, mockejb.jar, ojdbc14.jar, org.jboss.soa.esb.oracle.aq-4.2.jar). I tried modifying the quickstart to use the jms-jca-provider with a topic and a durable subscription, but received a NameNotFoundException: <queue_topic_name> not bound when deploying the project as JBoss expects to find the topics in the JNDI registry under topic/<topic-name> and queues under queue/<queue-name>. I then tried configuring jms-jca to listen to a remote queue/topic as described in the comments of the following Jira:
For the provider adapter MBean, I used:
<mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider">
<attribute name="ProviderName">RemoteJMSProvider</attribute>
<attribute name="ProviderAdapterClass"> org.jboss.jms.jndi.JNDIProviderAdapter </attribute>
<attribute name="FactoryRef">XAConnectionFactory</attribute>
<attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
<attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
<attribute name="Properties">
java.naming.factory.initial=org.jboss.soa.esb.oracle.aq.AQInitialContextFactory
java.naming.oracle.aq.user=user
java.naming.oracle.aq.password=pswd
java.naming.oracle.aq.server=server
java.naming.oracle.aq.instance=instance
java.naming.oracle.aq.schema=schema
java.naming.oracle.aq.port=1521
java.naming.oracle.aq.driver=thin
</attribute>
</mbean>
and added the providerAdapterJNDI=”java:/RemoteJMSProvider” attribute to the jms-jca-provider configuration in jboss-esb.xml. With this configuration, I get the below exception:
org.mockejb.MethodNotImplementedException: Method getEnvironment() not implemented by the class org.mockejb.jndi.MockContext
which is also documented in this posting:
http://community.jboss.org/message/504683#504683
The person posting this issue was able to solve this problem, but then ran into another exception from AQjms:
oracle.jms.AQjmsException: JMS-102: Feature not supported
at oracle.jms.AQjmsError.throwEx(AQjmsError.java:288)
at oracle.jms.AQjmsConnection.createConnectionConsumer(AQjmsConnection.java:1187)
There’s a JBoss OAQ patch (circa 2004) that has an AQjmsConnectionWrapper that implements the createConnectionConsumer method, but the comments mention testing with JBoss 3.0.8 and 3.2.3 and the Oracle 9i zip contains an “mq” folder instead of “jbm”.
http://sourceforge.net/tracker/index.php?func=detail&aid=912173&group_id=22866&atid=376687
I also found this patch referenced in another JBoss posting with the description “old non-JCA solution (not really supported well)”:
http://community.jboss.org/wiki/OracleAQ
What is the recommended approach for using jms-jca with Oracle Advanced Queues in SOA 5? Thanks in advance for your help.
Jennifer