1 Reply Latest reply on Aug 6, 2013 10:56 AM by Philipp Schreiber

    MDB that implements MessageListener interface on the superclass (from a different project) problem

    Leonardo Devai Newbie

      Hi all,

       

      I made a comment on the following JIRA issue and was asked to create a forum thread about it:

      https://issues.jboss.org/browse/AS7-2638?focusedCommentId=12705258

       

      I am getting the following message:

       

       

      ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."ejbProjectB.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ejbProjectB.jar".PARSE: Failed to process phase PARSE of deployment "ejbProjectB.jar"

       

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: EJB 3.1 FR 5.4.2 MessageDrivenBean org.test.impl.TestMDB does not implement 1 interface nor specifies message listener interface

      at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.getMessageListenerInterface(MessageDrivenComponentDescriptionFactory.java:182)

       

       

      The scenario in which I could reproduce this was the following:

       

       

      ejbProjectA - EJB Jar Project

      - org.test.base.AbstractMDB

      public abstract class AbstractAdapter implements MessageListener { ... }

       

       

       

      ejbProjectB - EJB Jar Project

      - org.test.impl.TestMDB

       

      @MessageDriven(activationConfig = {

      @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:/queue/test"),

      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })

      public class TestMDB extends AbstractAdapter {

       

        @Override public void onMessage(Message arg0) { ... }

       

      - MANIFEST.MF

      Manifest-Version: 1.0

      Dependencies: deployment.ejbProjectA.jar

       

       

      That is all, tested under 7.1.1.Final.

       

      This is not reproduceable if not in this scenario, of externally-dependent jars.

       

      If the abstract class implementing the MessageListener is on the same project, it works as supposed, as the bug fix corrected that already.

       

      The workaround for this is simply implement the MessageListener interface explicitly, but I just wanted to file this issue.

       

      Leonardo Devai