I am working on a POC. I have to achieve global transaction where my JMS listener persists the data in the database. In case any exception happens and persistence fails I want the JMS message to be sent back to queue. From the research that I have done I have added
@Transactional
@JmsListener(destination = "inbound.queue")
To my method and added the following dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-atomikos</artifactId>
</dependency>
But this does not seem to help. Can someone suggest me what am I missing here? Any help would be highly appreciated.