Nailing coffin of Application Server - 2PC / XA transactions with Spring Boot
Note: that article refers to Spring Boot 1.1.x, the XA support was embedded in Spring Boot 1.2.x, what I will cover another time. Recently I had to write an app that synchronizes queues with databases. Pretty dumb application that is far too simple to use any overkill technology. However, for full piece of mind I needed XA transactions between JMS queues and database. Here is how to enable XA for Spring Boot. 1. Transaction manager. You need transaction manager. I've chosen the Bitronix JTA Transaction Manager . Open source and free. The role of transaction manager is to track the state of distributed transaction on bulletproof way. Note that for it uses synchronized log files that are keep locally (here I've put them under 'run' directory). In your Gradle build script you need the following dependency: compile("org.codehaus.btm:btm:2.1.4") 2. Enabling transactions support and configuring JTA ransaction manager. It can be easily one by adding @Configu...