1 Reply Latest reply on Sep 22, 2008 5:56 AM by jmesnil

    @MessageDriven annotation

    bfach

      Hello,

      I am attempting to find a workaround for @MessageDriven annotation issue. If you put @MessageDriven and want to add more deployments using the deployment descriptors in the ear, you will have an error saying that the destination type is not configured for <<default bean name>>.

      This is due to the @MessageDriven annotation. If i do not use this annotation and describe all my beans in the xml deployment descriptors, the problem disappears. I would like to use the @MessageDriven annotation if possible.

      The idea is to have multiple types of MDBs in one deployable ear file that can be updated to deploy different types. For example.

      <enterprise-beans>
      <message-driven>
      <ejb-name>MDBA</ejb-name>
      <ejb-class>main.MDBA</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>
      </message-driven>
      <message-driven>
      <ejb-name>MDBB</ejb-name>
      <ejb-class>main.MDBB</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>
      </message-driven>
      </enterprise-beans>

      The idea here is that both classes use common framework provided to it within the same deployable.

      Both classes would have the @MessageDriven annotation however I would like to remove the error that is deplayed if you do not add in configuration here for a bean that is automatically deployed due to the @MessageDriven annotation in the event that you do not want to deploy MDBA.

      Thanks for the help. I hope it isn't too confusing.

        • 1. Re: @MessageDriven annotation
          jmesnil

           

          "bfach" wrote:
          Hello,

          I am attempting to find a workaround for @MessageDriven annotation issue. If you put @MessageDriven and want to add more deployments using the deployment descriptors in the ear, you will have an error saying that the destination type is not configured for <<default bean name>>.


          Hi, the @MessageDriven annotation are handled by the EJB code, not by JBoss Messaging.

          You should ask your question on the EJB forum instead: http://www.jboss.com/index.html?module=bb&op=viewforum&f=221