We have some strange Behaviour using a org.springframework.transaction.jta.WebSphereUowTransactionManager.
With org.springframework.transaction.jta.JtaTransactionManager JMSMessages will not redelivered if there take place a transaction rollBack in underlying code.
Our System:
Websphere 8.5.5.5, Spring 4, Hibernate3, Container Managed Transaction Configuration.
JMSMessage Sending:
connection = connectionFactory.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer publisher = session.createProducer(queue);
publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
JMSMessage recieving over MessageListener by onMessage method
There is no ERROR no RuntimeException no Exception in onMessage method call
The MessageBean is configured:
@TransactionManagement(TransactionManagementType.CONTAINER)
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
But there is a transaction rollback in underlying code during business logic triggered in onMessage method.
The Question is why working with org.springframework.transaction.jta.JtaTransactionManager there is no redelivering of JMSMessages
and with org.springframework.transaction.jta.WebSphereUowTransactionManager JMSMessages will be redelivered?
By same circumstances(transaction rollback take place in both situations and it is correct and is expected). How can i prevent redelivering in this situation by using org.springframework.transaction.jta.WebSphereUowTransactionManager? Is there a posibility to configure it? Is the only posibillity setting the "Maximum failed deliveries per message" the one solution? (see
http://www.ibm.com/developerworks/websphere/techjournal/1407_titheridge/1407_titheridge.html)