Showing posts from February, 2019

Spring JMS and JPA XA Transactions with WebLogic

spring-jms-and-jpa-xa-transactions-with-weblogic This article shows the configuration of using XA transactions with the resources managed by WebLogic server. There are three parts of configurations for this XA transactions to work - JMS, JPA and JTA. Both JMS and JPA are acquired through the JNDI registry and the XA transaction manager implementation uses the one from the WebLogic server. This configuration relies on WebLogic server. The concept should be similar and applicable to other JEE application servers. With these configurations, we could easily use @Transactional annotation on the services for XA transactions. Excerpt @Configuration public class JmsConfiguration { // properties... @Bean public ConnectionFactory connectionFactory ( ) { return lookupByJndiTemplate ( jmsConnectionFactory , ConnectionFactory . class ) ; } @Bean public JndiTemplate jndiTemplate ( ) { Jnd