1 2 Previous Next 15 Replies Latest reply on Sep 4, 2013 2:55 PM by William Moore

    ejb-jar.xml and MDB

    William Moore Newbie

      I had the following annotations in my MDB:

       

      @MessageDriven(name = "AccountTransferOutboundMDB",

              activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),

                      @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:/topic/whm_dev_ATROutboundTopic"),

                      @ActivationConfigProperty( propertyName="subscriptionDurability", propertyValue="Durable"),

                      @ActivationConfigProperty( propertyName="clientID", propertyValue="MYCATR"),

                      @ActivationConfigProperty( propertyName="subscriptionName", propertyValue="ATROutbound"),

                      @ActivationConfigProperty(propertyName = "connectorClassName", propertyValue = "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"),

                      @ActivationConfigProperty(propertyName = "connectionParameters", propertyValue = "host=168.179.60.173;port=5445")

              })

       

      These annotation are working.

       

      Now I moved them to an ejb-jar.xml, as follows:

       

      <message-driven>

          <ejb-name>AccountTransferOutboundMDB</ejb-name>

          <ejb-class>gov.utah.dts.messageDrivenBean.AccountTransferOutboundMDB</ejb-class>

           <transaction-type>Bean</transaction-type>

           <message-destination-type>javax.jms.Topic</message-destination-type>

         <activation-config>

            <activation-config-property>

                    <activation-config-property-name>destinationType</activation-config-property-name>

                    <activation-config-property-value>javax.jms.Topic</activation-config-property-value>

            </activation-config-property>

            <activation-config-property>

                  <activation-config-property-name>destination</activation-config-property-name>

                    <activation-config-property-value>java:/topic/whm_dev_ATROutboundTopic</activation-config-property-value>

            </activation-config-property>

            <activation-config-property>

                  <activation-config-property-name>subscriptionDurability</activation-config-property-name>

                    <activation-config-property-value>Durable</activation-config-property-value>

            </activation-config-property>

            <activation-config-property>

                  <activation-config-property-name>clientID</activation-config-property-name>

                    <activation-config-property-value>MYCATR</activation-config-property-value>

            </activation-config-property>

            <activation-config-property>

                  <activation-config-property-name>subscriptionName</activation-config-property-name>

                    <activation-config-property-value>ATROutbound</activation-config-property-value>

            </activation-config-property>

            <activation-config-property>

                  <activation-config-property-name>connectorClassName</activation-config-property-name>

                  <activation-config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</activation-config-property-value>

            </activation-config-property>

            <activation-config-property>

                  <activation-config-property-name>connectionParameters</activation-config-property-name>

                  <activation-config-property-value>host=168.179.60.173;port=5445</activation-config-property-value>

            </activation-config-property>

          </activation-config>

       

      </message-driven>

       

      When I run I am getting the following error which indicates the ejb-jar.xml is not being picked up:

      Caused by: javax.resource.spi.InvalidPropertyException: Destination is mandatory

       

      I am missing something but I have no idea what?

        1 2 Previous Next