Reputation: 636
I am trying to configure an EJB 2.1 MDB in ejb-jar.xml. My problem is there is no clear way to specify the destination (Queue name) the MDB suppose to listen to. I have exhausted the web without finding any useful information.
So in my ejb-jar.xml I have configured my DMB like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>LoginListenerMDB</ejb-name>
<ejb-class>com.mydomain.LoginListener</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
...
How can I specify the Queue name or jndi name the MDB should be listening to?
Upvotes: 0
Views: 1343
Reputation: 636
Ok, I figured it out. It is actually defined in another config file (eeeegrr) called jboss.xml:
<?xml version="1.0"?>
<!DOCTYPE jboss PUBLIC
"-//JBoss//DTD JBOSS 6.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_6_0.dtd">
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>LoginListenerMDB</ejb-name>
<destination-jndi-name>queue/LoginQueue</destination-jndi-name>
</message-driven>
...
I don't why it was done this way? Is that to allow binding the same MDB to more than one destination?
Upvotes: 0