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

Decorator for MDB is not used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • None
    • None

      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?

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

                Created:
                Updated:
                Resolved: