[
https://issues.apache.org/activemq/browse/SM-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bruce Snyder updated SM-1278:
-----------------------------
Attachment: SM-1278.diff.txt
> While using DefaultMessageListenerContainer transactions are not properly
> rolled back
> -------------------------------------------------------------------------------------
>
> Key: SM-1278
> URL: https://issues.apache.org/activemq/browse/SM-1278
> Project: ServiceMix
> Issue Type: Bug
> Affects Versions: 3.2, 3.2.1, 3.3
> Reporter: Bruce Snyder
> Assignee: Bruce Snyder
> Attachments: SM-1278.diff.txt
>
>
> While using DefaultMessageListenerContainer the JMSConsumer is not properly
> rolling back transactions.
> In AbstractMessageListenerContainer in doExecuteListener(...). it invokes
> rollbackIfNecessary(...)
> The condition in rollbackIfNeccessary(): "session.getTransacted() &&
> isSessionLocallyTransacted(session)" is evaluating to false at runtime so the
> rollback is not executed.
> isSessionsLocallyTransacted(...) was evaluated to false because
> JmsAccessor.sessionTransacted field is set to false;
> The reason is due to
> JmsConsumerEndpoint.createDefaultMessageListenerContainer(...) method
> implementation:
> {code:java}
> else if (TRANSACTED_JMS.equals(transacted)) {
> if (jms102) {
> cont.setTransactionManager(new
> JmsTransactionManager102(getConnectionFactory(), isPubSubDomain()));
> } else {
> cont.setTransactionManager(new
> JmsTransactionManager(getConnectionFactory()));
> }
> }
> {code}
> Needs to be
> {code:java}
> } else if (TRANSACTED_JMS.equals(transacted)) {
> cont.setSessionTransacted(true);
> if (jms102) {
> cont.setTransactionManager(new
> JmsTransactionManager102(getConnectionFactory(), isPubSubDomain()));
> } else {
> cont.setTransactionManager(new
> JmsTransactionManager(getConnectionFactory()));
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.