[jboss-user] [JBoss Messaging] - EJB 3.0 MDB isn't getting messages

whartung do-not-reply at jboss.com
Thu Oct 5 17:42:13 EDT 2006


I have a simple SessionBean trying to send a message to a simple MDB.

The session bean "succeeds" in sending the message, but the MDB is not getting the message.

I put "succeeds" in quotes because all I can safely say is that I'm not getting an exception when I send the message, but when I look at  the jboss.mq.DestinationManager using the JMX console, it doesn't show any message traffic.

Relevant bits from the the SessionBean:

  |     Connection connection = null;
  |     @Resource(mappedName = "ConnectionFactory")
  |     private ConnectionFactory connectionFactory;
  |     @Resource
  |     private SessionContext sc;
  |     @Resource(mappedName = "jms/MirthMessageMDB")
  |     private Queue queue;
  | 


  |             session = connection.createSession(true, 0);
  |             publisher = session.createProducer(queue);
  |             message = session.createObjectMessage();
  |             
  |             message.setObject(payload);
  |             publisher.send(message);
  | 

Relevant bits from the MDB.


  | @MessageDriven(mappedName = "jms/MirthMessageMDBx",
  |     activationConfig =  {
  |         @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"), 
  |         @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")})
  | 

And relevant bits from my config:


  |     <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=mirth">
  |         <attribute name="JNDIName">jms/MirthMessageMDB</attribute>
  |         <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
  |     </mbean>
  | 

Everything runs quietly. I get no exceptions.

I added:

  |    <category name="org.jboss.mq">
  |      <priority value="TRACE" class="org.jboss.logging.XLevel"/>
  |    </category>
  |    <category name="org.jboss.jms">
  |      <priority value="TRACE" class="org.jboss.logging.XLevel"/>
  |    </category>
  |    <category name="org.jboss.ejb.plugins.jms">
  |      <priority value="TRACE" class="org.jboss.logging.XLevel"/>
  |    </category>
  | 

To conf/log4j.xml, but I'm not seeing any activity about these in the log.

I also see "jms/MirthMessageMDB" in the JNDI view of the JMX console.

I've tried renaming the queue in the config, and my SessionBean fails appropriately because it can't find the queue to inject in to it, but the MDB seems to deploy even with the badly named queue.

So, I'm a bit flumoxed.  Any suggestions on moving forward appreciated.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976427#3976427

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976427



More information about the jboss-user mailing list