I am trying to connect to WMQ and Solace messaging framework to consume messages from both I have multiple listeners for WMQ but while trying to associate/bind another listener to solace adapter, application does not start
As only last listener is getting binded to solace
Reference file
<?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:c="urn:clustering:1.0" xmlns:r="urn:resource-adapter-binding"
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>CoreMessageEventListener</ejb-name>
<ejb-class>com.slohiya.ListenerA</ejb-class>
<activation-config>
<activation-config-property>
.
.
.
</activation-config-property>
</activation-config>
</message-driven>
<message-driven>
<ejb-name>ListenerB</ejb-name>
<ejb-class>com.slohiya.ListenerB</ejb-class>
<activation-config>
<activation-config-property>
.
.
.
</activation-config-property>
</activation-config>
</message-driven>
<message-driven>
<ejb-name>ListenerX</ejb-name>
<ejb-class>com.slohiya.ListenerX</ejb-class>
<activation-config>
<activation-config-property>
.
.
.
</activation-config-property>
</activation-config>
</message-driven>
<message-driven>
<ejb-name>ListenerY</ejb-name>
<ejb-class>com.slohiya.ListenerY</ejb-class>
<activation-config>
<activation-config-property>
.
.
.
</activation-config-property>
</activation-config>
<message-driven>
</enterprise-beans>
<assembly-descriptor>
<r:resource-adapter-binding>
<ejb-name>ListenerA</ejb-name>
<r:resource-adapter-name>wmq.jmsra.rar</r:resource-adapter-name>
</r:resource-adapter-binding>
</assembly-descriptor>
<assembly-descriptor>
<r:resource-adapter-binding>
<ejb-name>ListenerB</ejb-name>
<r:resource-adapter-name>wmq.jmsra.rar</r:resource-adapter-name>
</r:resource-adapter-binding>
</assembly-descriptor>
<assembly-descriptor>
<r:resource-adapter-binding>
<ejb-name>ListenerX</ejb-name>
<r:resource-adapter-name>com.solacesystems.ra</r:resource-adapter-name>
</r:resource-adapter-binding>
</assembly-descriptor>
<assembly-descriptor>
<r:resource-adapter-binding>
<ejb-name>ListenerY</ejb-name>
<r:resource-adapter-name>com.solacesystems.ra</r:resource-adapter-name>
</r:resource-adapter-binding>
</assembly-descriptor>
</jboss:ejb-jar>
So in this case JBOSS is trying to associate ListenerX to wmq.jmra.rar and fails.
In standalone.xml default adapter is wmq but stil, it should be possible to override it in jboss-ejb3.xml and it works fine if I use only one listener for solace adapter.
<mdb>
<resource-adapter-ref resource-adapter-name="wmq.jmsra.rar"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
Problem occurs only when I am trying to use multiple listeners with solace as resource adapter.
Your help is appreciated. Thanks.
I've got this to work using the assembly-descriptor now. I believe that the problem is that you have multiple
<assembly-descriptor>
sections that result in a strange behavior from JBoss.Here is a sample jboss-ejb3.xml: