Both my producer and consumer connection pools are set to XATransaction in the Glassfish control panel, yet when I perform a mdc.setRollbackOnly() onMessage the message isn't sent to the DMQ and just bounce around forever.
My ejb-jar.xml says it should only be redelivered 3 times. What have I done?
[b]sender:[/b]
session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
producer = session.createProducer(queue);
message = session.createTextMessage();
message.setText(body);
producer.send(message);
[b]receiver:[/b]
public void onMessage(Message message)
{
// Always punt.
mdc.setRollbackOnly();
<ejb>
<ejb-name>HubToFabSgp01ReceiverMDBean</ejb-name>
<jndi-name>jms/HubToFabSgp01Queue</jndi-name>
<mdb-connection-factory>
<jndi-name>jms/HubToFabSgp01Factory</jndi-name>
</mdb-connection-factory>
<mdb-resource-adapter>
<activation-config>
<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-property-name>
<activation-config-property-value>Auto-acknowledge</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
[b] <!-- error handling -->
<activation-config-property>
<activation-config-property-name>RedeliveryAttempts</activation-config-property-name>
<activation-config-property-value>3</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>RedeliveryInterval</activation-config-property-name>
<activation-config-property-value>10</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>SendBadMessagesToDMD</activation-config-property-name>
<activation-config-property-value>true</activation-config-property-value>
</activation-config-property>[/b] </activation-config>
</mdb-resource-adapter>
</ejb>
[Message sent by forum member 'frenchdrip' (frenchdrip)]
http://forums.java.net/jive/thread.jspa?messageID=248946