35.4 Using a Java EE managed transaction manager
If you are packaging your Spring Boot application as a war
or ear
file and deploying it to a Java EE application server, you can use your application servers built-in transaction manager. Spring Boot will attempt to auto-configure a transaction manager by looking at common JNDI locations (java:comp/UserTransaction
, java:comp/TransactionManager
etc). If you are using a transaction service provided by your application server, you will generally also want to ensure that all resources are managed by the server and exposed over JNDI. Spring Boot will attempt to auto-configure JMS by looking for a ConnectionFactory
at the JNDI path java:/JmsXA
or java:/XAConnectionFactory
and you can use the spring.datasource.jndi-name
property to configure your DataSource
.