The thing is that they are NOT being called from different implementations.
It is the exact same code except they are configured differently. Multiple MDBs are
deployed as such in the xml
<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>MDBA</ejb-name>
<ejb-class>main.MDB</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<env-entry>
<env-entry-name>config</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>A</env-entry-value>
</env-entry>
</message-driven>
<message-driven>
<ejb-name>MDBB</ejb-name>
<ejb-class>main.MDB</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<env-entry>
<env-entry-name>config</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>B</env-entry-value>
</env-entry>
</message-driven>
</enterprise-beans>
<message-driven>
<ejb-name>MDBA</ejb-name>
destination-jndi-name>queue/A</destination-jndi-name>
</message-driven>
<message-driven>
<ejb-name>MDBB</ejb-name>
<destination-jndi-name>queue/B</destination-jndi-name>
</message-driven>
The difference here is that the injected "config" property is used to lookup its
respective configuration.
Thanks for the help again. I have posted the original post on the EJB3 forum.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180019#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...