2 Replies Latest reply on Apr 26, 2002 3:39 AM by Stuart Guthrie

    Different instances of MDBs - same class.

    Stuart Guthrie Newbie

      Hi there,

      I'm new to the forum so please be gentle..

      I'm trying to use the same MDB class for feeding from two seperate queues and passing on to two seperate other queues after standard processing in the MDB.

      Questions:

      1) Is there a way of accessing the ejb-name of an MDB?
      2) Is there a way of passing a parameter to an instance of an MDB in the same way as the MBEAN's can.

      This is the deployment info, the same ejb-class with two different ejb-names, I'd like to use the name as a 'parameter' for the MDB's behaviour:


      <ejb-name>sourceOutMDB</ejb-name>
      <ejb-class>com.xxx.mdb.sourceOutMDB</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>
      - <resource-ref>
      <res-ref-name>jms/QCF</res-ref-name>
      <res-type>javax.jms.QueueConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      </message-driven>
      - <message-driven>
      <ejb-name>TSTsourceOutMDB</ejb-name>
      <ejb-class>com.xxx.mdb.sourceOutMDB</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>
      - <resource-ref>
      <res-ref-name>jms/QCF</res-ref-name>
      <res-type>javax.jms.QueueConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      </message-driven>
      - <message-driven>