1 Reply Latest reply on Apr 14, 2006 1:47 PM by lpmon

    JMS, EJB3 annotation MBeans-  onMessage not firing

    lpmon Novice

      I have probably missed a setup. This is my first EJB3 MBean.

      Enviroment: JBoss 4.0.3SP1, Win 2003, JDK 5.0_06,
      with EJB3 - jboss-EJB-3.0_RC5-PFD

      First: I know the messages are being queued properly because I can read them 'manually' with

      Message received = receiver.receive(); // blocks until message arrives

      I think this rules out a problem in jbossmq-destinations-service.xml. Right?

      I installed the EJB3 per instructions
      I created both a topic and a queue
      I used the annotation to setup the target MBean

      Doesn't the annotation automatically register the MBean as a listener/consumer target and deploy the MBean? How do I confirm it was deployed as it should be?


      I used this:
      http://trailblazer.demo.jboss.com/EJB3Trail/serviceobjects/mdb/
      as a starting point. So my source has an onMessage method and this shown next for the EJB3 annotations

      @MessageDriven(activationConfig =
      {
      @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic"),
      @ActivationConfigProperty(propertyName="destination", propertyValue="topic/swevent")
      })

      public class EventMonitor implements MessageListener
      {

      @Resource
      MessageDrivenContext msgDrivCtx;

      ...
      ..

      Besides setting up the queue or topic (I tried both) and using the the annotations what else do I need to do?

      I get no errors or warnings of any kind. I just never get a message delivery to the MBean. I can read the messages manually.