You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Tom Ross (JIRA)" <ji...@apache.org> on 2016/10/10 07:15:21 UTC
[jira] [Comment Edited] (AMQ-6461) ActiveMQ Resource Adapter does
not work with user transactions
[ https://issues.apache.org/jira/browse/AMQ-6461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15561510#comment-15561510 ]
Tom Ross edited comment on AMQ-6461 at 10/10/16 7:14 AM:
---------------------------------------------------------
To reproduce the issue just deploy a very simple MDB
{noformat}
@MessageDriven(
activationConfig ={
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="testQueue"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "15")
})
@ResourceAdapter("amq-ra")
@TransactionManagement(TransactionManagementType.BEAN )
public class BMTMdbRedeliveryTesting implements MessageListener {
private static final Logger log = Logger.getLogger(BMTMdbRedeliveryTesting.class);
@Resource
private UserTransaction utx;
public BMTMdbRedeliveryTesting() {
}
/**
* @see MessageListener#onMessage(Message)
*/
public void onMessage(Message message) {
try {
utx.begin()
throw new RuntimeException("Reject Message");
ute.commit;
} catch (Throwable t){
utx.SetRollbackOnly();
}
{noformat}
The message should be rejected/redelivered a number of times and eventually send to DLQ. But that is not what happens.
was (Author: raggz):
To reproduce the issue just deploy a very simple MDB
{noformat}
@MessageDriven(
activationConfig ={
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="testQueue"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "15")
})
@ResourceAdapter("amq-ra")
@TransactionManagement(TransactionManagementType.BEAN )
public class BMTMdbRedeliveryTesting implements MessageListener {
private static final Logger log = Logger.getLogger(BMTMdbRedeliveryTesting.class);
@Resource
private UserTransaction utx;
public BMTMdbRedeliveryTesting() {
}
/**
* @see MessageListener#onMessage(Message)
*/
public void onMessage(Message message) {
try {
utx.begin()
throw new RuntimeException("Reject Message");
ute.commit;
} catch (Throwable t){
utx.SetRollbackonly();
}
{noformat}
The message should be rejected/redelivered a number of times and eventually send to DLQ. But that is not what happens.
> ActiveMQ Resource Adapter does not work with user transactions
> --------------------------------------------------------------
>
> Key: AMQ-6461
> URL: https://issues.apache.org/jira/browse/AMQ-6461
> Project: ActiveMQ
> Issue Type: Bug
> Components: RAR, XA
> Affects Versions: 5.11.0
> Environment: JBoss EAP 6.4.10 + ActiveMQ RA ver 5.11
> Reporter: Tom Ross
>
> When a MDB annotated with
> @TransactionManagement(TransactionManagementType.BEAN )
> throws a RuntimeException the message processing appears to be suspended. I would expect to see a number of attempts to redeliver the message and eventually send it to DLQ. But that does not happen.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)