Transactions, Spring.
DataSource that we set in the LocalContainerEntityManagerFactoryBean here is provided by Atomikos with distributed transactions enabled: @Bean(initMethod = "init", destroyMethod = "close") public DataSource dataSource() throws SQLException { MysqlXADataSource mysqlXaDataSource = new