MDB not getting invoked with messages sent to queue
sharmamanish3 Jul 27, 2015 12:56 PMHi,
Relates to JBOSS 6.4.
Looks I have incorrect set-ups due to which the MDB isn't invoked even with messages on queue
Below is the domain.xml file
<jms-destinations>
<jms-queue name="XYZ_ResponseQueue">
<entry name="java:jboss/exported/XYZ_ResponseQueue"/>
<entry name="XYZ_ResponseQueue"/>
<durable>true</durable>
</jms-queue>
</jms-destinations>
Content in ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<display-name>TES App</display-name>
<enterprise-beans>
<message-driven>
<display-name>TES</display-name>
<ejb-name>TES_MDB</ejb-name>
<ejb-class>com.bgcp3.tes.tesprocess.TFInterfaceMessageListener</ejb-class>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>java:jboss/exported/XYZ_ResponseQueue</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>TES_MDB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
content in JBOSS.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC
"-//JBoss//DTD JBOSS 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>TES_MDB</ejb-name>
<destination-jndi-name>XYZ_ResponseQueue</destination-jndi-name>
<resource-ref>
<res-ref-name>XYZ_ResponseQueue</res-ref-name>
<jndi-name>java:jboss/exported/XYZ_ResponseQueue</jndi-name>
</resource-ref>
</message-driven>
</enterprise-beans>
</jboss>
Although the messages are present in the XYZ_ResponseQueue but the MDB doesn't gets activated.
Would it be possible to comment on what is wrong in above set-up.
In above scenario - a client is sending messages to the above queue supposed to be read by MDB.
Many thanks in advance.