2 Replies Latest reply on Nov 3, 2008 1:19 PM by wconroy

    EJB3 MDB Dynamic Destination

    cbax007-2

      Is there any way to setup an EJB3 MDB in JBoss so that I can set the destination at runtime as oppose to being hardcoded in an annotation.

        • 1. Re: EJB3 MDB Dynamic Destination
          peterj

          In your NETA-INF/ejb-jar.xml, place:

          <ejb-jar ...>
           <enterprise-beans>
           <message-driven>
           ...
           <activation-config>
           <activation-config-property>
           <activation-config-property-name>destination</activation-config-property-name>
           <activation-config-property-value>queue/SomeQueueName</activation-config-property-value>
           </activation-config-property>
           </activation-config>
           </message-driven>
           <enterprise-beans>
          </ejb-jar>


          All of the @ActivationConfigProperty annotation values can be set this way.

          • 2. Re: EJB3 MDB Dynamic Destination

            Is it possible to set activation-config properties in a file that is not embedded within the ejb-jar?

            For example, is there a file you could put into the deploy directory of your server that could set this same property?