Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-696

Decorator for MDB is not used

    XMLWordPrintable

Details

    Description

      Guys, I'm using Wildfly 8.2.1.Final
      Here is MDB bean:

      @MessageDriven(activationConfig = {
              @ActivationConfigProperty(propertyName = "destinationLookup",
                      propertyValue = "topic/dse"),
              @ActivationConfigProperty(propertyName = "destinationType",
                      propertyValue = "javax.jms.Topic")
      })
      public class JobChangedSubscriber implements MessageListener {
      ...
          @Override
          public void onMessage(final Message message) {
      ...
          }
      }
      

      And decorator:

      @Decorator
      public class RetroplannerSubscriber implements MessageListener {
          @Inject
          @Delegate
          @Any
          JobChangedSubscriber jobChangedSubscriber;
      
          @Override
          public void onMessage(Message message) {
              jobChangedSubscriber.onMessage(message);
              //custom code
          }
      }
      

      During deployment, all mistakes about decorator definition are shown. They were fixed. I was sure it would work. But now, only JobChangedSubscriber.onMessage() is invoked.

      As a user I want to decorate MDB as an usual CDI bean. What am I doing wrong?

      Attachments

        Activity

          People

            Unassigned Unassigned
            avsokolov_jira Alexandr Sokolov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: