Support Article
JMS MDB Listener for IBM MQ does not work in Jboss 7
SA-76294
Summary
Java Message Service (JMS) Message-Driven Bean (MDB) Listener does not work in JBoss 7 when configured to use wmq.jmsra.rar to connect to the IBM Message Queue (MQ).
Error Messages
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.1.0.Final:deploy-only (default-cli) on project prpc_j2ee14_jboss7JBM: Failed to execute goal deploy-only: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"prpc_j2ee14_jboss7JBM.ear\".\"prbeans.jar\".component.YOUR_MDBListener.START" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"prpc_j2ee14_jboss7JBM.ear\".\"prbeans.jar\".component.YOUR_MDBListener.START: java.lang.RuntimeException: javax.resource.spi.InvalidPropertyException: Invalid settings: Destination is mandatory. If subscription is durable then subscription name must be specified.
14:00:19 [ERROR] Caused by: java.lang.RuntimeException: javax.resource.spi.InvalidPropertyException: Invalid settings: Destination is mandatory. If subscription is durable then subscription name must be specified.
Steps to Reproduce
Unknown
Root Cause
A defect or configuration issue in the operating environment.
JNDI configuration was used in jboss-ejb3.xml.
Resolution
Make the following change to the operating environment:
<?xml version="1.1" encoding="UTF-8"?>
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:r="urn:resource-adapter-binding"
xmlns:p="urn:ejb-pool:1.0"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
version="3.1" impl-version="2.0">
<enterprise-beans>
<message-driven>
<ejb-name>your_mqMDB</ejb-name>
<ejb-class>com.redhat.gss.service.ejb30.mdb.your_WebSphereMDB</ejb-class>
<activation-config>
<activation-config-property>
<activation-config-property-name>connectionNameList</activation-config-property-name>
<activation-config-property-value>${wmq.connectionlist}</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>useJNDI</activation-config-property-name>
<activation-config-property-value>false</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>channel</activation-config-property-name>
<activation-config-property-value>SYSTEM.DEF.SVRCONN</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>queueManager</activation-config-property-name>
<activation-config-property-value>REDHAT.QUEUE.MANAGER</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>REDHAT.QUEUE</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>transportType</activation-config-property-name>
<activation-config-property-value>CLIENT</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>maxPoolDepth</activation-config-property-name>
<activation-config-property-value>15</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<r:resource-adapter-binding>
<ejb-name>mqMDB</ejb-name>
<r:resource-adapter-name>${wmq.jca.version}</r:resource-adapter-name>
</r:resource-adapter-binding>
</assembly-descriptor>
</jboss:ejb-jar>
The MQ host is connectionNam eList.
Specifiy the port in the below format.
YOUR_HOST.DOMAIN.com(YOUR_PORT)
Published April 2, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.