activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abdul Alhazred <>
Subject JBoss EJB3 MDB delivery failure
Date Sun, 27 Apr 2008 16:21:03 GMT


I have a little problem with a JBoss EJB3 MDB. Using JBoss 4.0.5GA and AMQ
4.1. Generally it seems JBoss has no problems with deploying the
ConnectionFactories, etc., and MDB message inflow appears to work fine. That
is messages are delivered with no problems, and if I create a POJO and have
it manually look up the CF and the destination, etc I can reliably receive

The problem comes in when the EJB3 MDB receives a message, there is an
exception, and the exception is propagated back out of the onMessage()
method of the MDB. From that point on, the MDB is dead. Nothing is ever
received again. Examining the state on the AMQ side in JMX shows the broker
believes there is a consumer, but no messages are ever dequeued from the

Calling stop() and then start() methods in the JBoss JMX console on the
MDB's service management interface seems to deal with the problem. Now I get
messages again. If I set the MDB up to use transactions, I get redelivery of
the offending message. 

I just do not know what might be causing the issue. 

There isn't anything particularly unusual about my configuration. 

@MessageDriven(activationConfig =  {
activationConfig =  {
		  @ActivationConfigProperty(propertyName = "acknowledgeMode",
propertyValue = "Auto-acknowledge"),
		  @ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue"),
		  @ActivationConfigProperty(propertyName = "destination", propertyValue =
public class OMSMDBConnector implements MessageListener {
	public void onMessage(Message message) {
			ObjectMessage omsg = (ObjectMessage) message;
			ETSEventMessage evt = (ETSEventMessage) omsg.getObject();
			LOGGER.debug("OMSMDBConnector received event type
			if(evt instanceof ETSExecutionEvent ) {
				postToWIT((ETSExecutionEvent) evt);
			} else if(evt instanceof ETSLogEvent) {
			} else {
				LOGGER.debug("Event type not supported, discarding");

And the connection factory/destination configuration is:

	  <!--      <xa-transaction />
	  <track-connection-by-tx/> --> <!-- Thanks to Adrian Brock for pointing
this one out! -->

   <mbean code="org.jboss.resource.deployment.AdminObject"
	   <attribute name="JNDIName">ets/queue/witadapter</attribute>
	   <attribute name="Type">javax.jms.Queue</attribute>

Not sure what else to mess with here. 
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message