Skip to content
Advertisement

Tag: distributed-transactions

Spring boot “no transaction is in progress” with 2 datasources

I have two databases and i’m trying to save some records to both of them inside a service method. This gives me the error: org.springframework.dao.InvalidDataAccessApiUsageException: no transaction is in progress; nested exception is javax.persistence.TransactionRequiredException: no transaction is in progress. Here is entities: And here is one of the config files for multiple db connection: And here is the other one:

Advertisement