Starting an MDB from IBM MQ (aka. WebSphere MQ aka. MQ Serie
tazly Jan 3, 2005 10:22 AMI can succesfully send messages from JBoss to an IBM MQ on a remote Queue Manager. But when messaging to JBoss, I cannot get my MDB to work.
I'm using the JMSAdmin tool from IBM, which binds the IBM MQ and QCF to JBoss' JNDI. All is fine here:
define ctx(jms) change ctx(jms) define qcf(qcf) tran(CLIENT) host(MVSPF) port(1415) chan(CLIENT.TO.MQU1) qmgr(MQU1) define q(senderQ) queue(JB.ITA.TEST.RESPONSE) qmgr(MQU1) define q(incomingQ) queue(JB.ITA.TEST.REQUEST) qmgr(MQU1)
But JBoss cannot start my MDB. This is what happens:
16:10:35,553 ERROR [JMSContainerInvoker] 16:20:08,397 INFO [EjbModule] Deploying XMLParserEJB port.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.lang.Thread.run(Unknown Source) r.java:764) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221) at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60) ... 107 more 16:20:08,477 ERROR [JMSContainerInvoker] Starting failed jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/XMLParserEJB java.lang.ClassCastException: com.ibm.mq.jms.MQQueue at org.jboss.mq.SpyConnectionConsumer.<init>(SpyConnectionConsumer.java:91) at org.jboss.mq.SpyConnection.createConnectionConsumer(SpyConnection.java:166) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:740)
Configuration: JBoss 3.2.6 or 4.0.0 (same result)
jboss.xml
<message-driven> <ejb-name>XMLParserEJB</ejb-name> <destination-jndi-name>jnp://localhost:1099/jms/incomingQ</destination-jndi-name> <resource-ref> <res-ref-name>jms/qcf</res-ref-name> <jndi-name>jnp://localhost:1099/jms/qcf</jndi-name> </resource-ref> </message-driven>
ejb-jar.xml
<message-driven> <description>Send an XML document, and recieve parsed tokens.</description> <display-name>XML Parser</display-name> <ejb-name>XMLParserEJB</ejb-name> <ejb-class>dk.jyskebank.integration.ejb.XMLParserBean</ejb-class> <transaction-type>Container</transaction-type> <acknowledge-mode>Auto-acknowledge</acknowledge-mode> <message-driven-destination> <destination-type>javax.jms.Queue</destination-type> <subscription-durability>Durable</subscription-durability> </message-driven-destination> <resource-ref> <res-ref-name>jms/qcf</res-ref-name> <res-type>javax.jms.QueueConnectionFactory</res-type> <res-auth>Container</res-auth> </resource-ref> </message-driven>
The presumably useful link that everybody keeps posting, and which is also present in the JBoss documentation chapter 6 is dead:
http://sourceforge.net/tracker/index.php?func=detail&aid=753022&group_id=22866&atid=376687
Any help appriciated