3 Replies Latest reply on Oct 20, 2009 2:20 PM by jbossborot

    Topic Listener MDB problems

      MDB doesn't seem to connect to JMS Topic, message posted by j2se client to JMS Topic doesn't seem to show in Topic stats.

      Setup: WinXP, JBoss 5.1, Eclipse Galileo, JDK 1.6.
      JBoss setup seems to be functioning, as an EJB app has deployed and was tested just fine.

      @MessageDriven(activationConfig = {
      @ActivationConfigProperty(
      propertyName = "destinationType",
      propertyValue = "javax.jms.Topic") },
      mappedName = "JMSTopic1",
      name="TopicMDB1")
      public class TopicMDB1 implements MessageDrivenBean, MessageListener {...}

      Using Eclipse JEE plugin, the MDB is added to an EAR proj, which is then "deployed" {Run} on JBoss.
      The deployment seems to conclude without errors, but there are no signs of the bean anywhere.

      A j2se test client puts a simple text msg to the Topic, but there's no sign of that msg either in the JMS system, nor is it being consumed by anybody {obviously}.

      I am a noob to JBoss, but have done this in Weblogic many times, if that counts for anything.

      Any suggestions would be welcome.
      karoy

        • 1. Re: Topic Listener MDB problems

          By this bit:

          "I" wrote:
          ...there's no sign of that msg either in the JMS system...
          I meant that while the server console log shows all kinds of stuff being done, as the JSM tracing is turned on, using these instructions: http://www.jboss.org/community/wiki/JBossMessagingUserEnablingTRACEloggingonserver.

          I just don't see it the Topic's statistics that a message passed through or something.

          • 2. Re: Topic Listener MDB problems
            gaohoward

            Hi,

            It seems like a MDB config issue, can you post the question to EJB team? Also JBM has some good examples for users to get started. You can download them from JBoss.org. Especially there is an example ejb3mdb that may be of some interest to you.

            Howard

            • 3. Re: Topic Listener MDB problems

              So, indeed, the fix seems to have been related to a missing Activation Property: @ActivationConfigProperty(propertyName = "destination", propertyValue = "JMSTopic1").
              This is kinda strange, since the setting mappedName, already names the Topic.

              The bean wasn't deploying properly, but the error was swallowed until the JBoss log4j settings were set to TRACE, which ended up spelling out the details.