Yes.

You can configure multiple MDBs, each with a different name in the ejb-jar.xml 
and jboss.xml file that use the same class.

Example:

ejb-jar.xml
-------------

      <!-- Queue #1 -->
      <message-driven >
         <ejb-name>Foo1</ejb-name>
         <ejb-class>org.foo.FooEJB</ejb-class>
         <transaction-type>Container</transaction-type>
         <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
         <message-driven-destination>
            <destination-type>javax.jms.Queue</destination-type>
            <subscription-durability>NonDurable</subscription-durability>
         </message-driven-destination>
      </message-driven>

      <!-- Queue #2 -->
      <message-driven >
         <ejb-name>Foo2</ejb-name>
         <ejb-class>org.foo.FooEJB</ejb-class>
         <transaction-type>Container</transaction-type>
         <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
         <message-driven-destination>
            <destination-type>javax.jms.Queue</destination-type>
            <subscription-durability>NonDurable</subscription-durability>
         </message-driven-destination>
      </message-driven>

jboss.xml
-----------

      <!-- Queue #1 -->
    <message-driven>
      <ejb-name>Foo1</ejb-name>
        <destination-jndi-name>queue/queue1</destination-jndi-name>
    </message-driven>

      <!-- Queue #1 -->
    <message-driven>
      <ejb-name>Foo2</ejb-name>
        <destination-jndi-name>queue/queue2</destination-jndi-name>
    </message-driven>


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3897990#3897990

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3897990


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to