Given the following Message Driven Bean, is it possible to define a global decorator from the CDI specification to add additional behaviour?
@MessageDriven
public class MyMessageDrivenBean implements MessageListener {
@Override
public void onMessage(Message m) {
}
}
The decorator looks like this:
@Decorator
@Priority(Interceptor.Priority.APPLICATION)
public abstract DecorateMyMessageDrivenBean implements MessageListener {
@Inject
@Delegate
@Any
private MessageListener delegate;
@Override
public void onMessage(Message m) {
}
}
Currently, the decorator is not being executed. I have added a beans.xml file to my module.