Maybe zhfeng can answer better but my guess is that the connection is not somehow not been configured for XA.
Our example does things like this: quickstart/DatabaseConfig.java at e60eeb850e93e7cc69c2cdaae3c35b52d0c96e48 · jbosstm/quickstart · GitHub
Maybe start with some trace logging on Arjuna so you can see what is happening there, plus a stack trace.
I've tried different combination of quickstart examples but most of them are based on jdbc and the one which is based on jpa is not using spring boot.
I am already using XADatasource here
Just to clear few things
Is it okay to use tomcat as spring boot embedded server while my RESTAT runs on wildfly ?
For two different microservices with separated database should it be connected to same artemis server ?
because you can not run spring.artemis.mode=embedded for two different app it will lock the second app.
When we have ManagedDataSource what is the point of NarayanaDataSourceBean, what is the difference?
I also realized that in stock market application it is org.springframework.boot.jta.XADataSourceWrapper but it is not anymore there and in my app it is org.springframework.boot.jdbc.XADataSourceWrapper.
I added this two attributes in application.properties and it works now
Great - thanks for reporting back! Where did you find the info on how to do that, it might be useful for our community
First I was blaming Narayana then I read my ass off through HIbernate and Spring code to find out. well, That's the beauty of opensource
We had moved the springboot and narayana integration codes to GitHub - snowdrop/narayana-spring-boot: Narayana Spring Boot autoconfiguration and starter , so I just suggest to use the new artifact
<groupId>me.snowdrop</groupId> <artifactId>narayana-spring-boot-starter</artifactId> <version>2.1.0</version>
Also you could configuration to enable the DBCP support.
Hope this is helpful !