Using JBoss ESB plugin to consume Oracle AQ JMS
nodari Sep 28, 2007 11:12 AMHi,
I am trying to consume JMS messages from an Oracle AQ system, but I'm using only JBoss AS 4.2 instead of JBoss ESB. I got the plugin used in JBoss ESB sample hello_world_action and created the following configuration:
JBoss AS 4.2 (with JBoss MQ)
org.jboss.soa.esb.oracle.aq-4.2.jar in the lib directory
asm.jar, cglib.jar, mockejb.jar, aqapi.jar, ojdbc14.jar also in the lib directory
In the jms-ds.xml configuration file I createds a new JMS Provider pointing to the initial context factory in the JBoss ESB plugin.
In the standardjboss.xml configuration file I created a new invoker=proxy-binding and a new container pointing to the new JMS Provider above.
When I deploy a MDB using this new JMS Provider, the initial context factory is activated and pull all the JMS Queues from Oracle AQ to his context without problems. But when the MDB tries to find a queue in this contexts I get the following exception:
org.mockejb.MethodNotImplementedException: Method getEnvironment() not implemented by the class org.mockejb.jndi.MockContext
at org.mockejb.jndi.MockContext.throwMethodNotImplemented(MockContext.java:834)
at org.mockejb.jndi.MockContext.getEnvironment(MockContext.java:333)
at org.mockejb.jndi.MockContext$$FastClassByCGLIB$$8f78c5.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.mockejb.interceptor.InterceptorInvoker$CglibMethodInvoker.intercept(InterceptorInvoker.java:95)
at org.mockejb.interceptor.InvocationContext.proceed(InvocationContext.java:177)
at org.mockejb.interceptor.InterceptorInvoker.invoke(InterceptorInvoker.java:53)
at org.mockejb.interceptor.InterceptableProxy.intercept(InterceptableProxy.java:58)
at $javax.naming.Context$$EnhancerByCGLIB$$83c6105b.getEnvironment()
at javax.naming.InitialContext.getEnvironment(InitialContext.java:484)
at javax.naming.InitialContext.getEnvironment(InitialContext.java:484)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:298)
at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:585)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
at java.lang.Thread.run(Thread.java:595)
I read in the JBoss ESB hello_world_action sample that the mockejb.jar is needed because of a difference in the registration of the queues (JNDI in JBoss, LDAP in Oracle) but i didn't manage to make the mockejb solution work.
Any clues are welcome :-)
Thanks in advance,