1 Reply Latest reply on Sep 28, 2004 10:00 AM by genman

    Find ejb-name from winthin an MDB?

    ewestland

      Hi,

      Does anyone know how to get the "ejb-name" (or other deployment descriptor information) of an MDB from within a method (i.e "onMessage()")?

      Background: I have a situation where a set of MDBs need to post to a parallel set of queues. The problem is that I have no good way of determining the name of the new destination queue. All the MDBs use the same implementation class and differ only by the attributes in the deployment descriptor, so the class name doesn't distinguish them.

      Thoughts?

      BTW - My current solution is to look at the Message (received in the onMessage()) and pull its name apart, but that may not work for all situations.

      Thanks,
      Erik

        • 1. Re: Find ejb-name from winthin an MDB?
          genman


          You can add <env-entry>s in your ejb-jar.xml:

          <env-entry>
          Wait delay
          <env-entry-name>RetryDelay</env-entry-name>
          <env-entry-value>10000</env-entry-value>
          <env-entry-type>java.lang.Integer</env-entry-type>
          </env-entry>