I have an OSGi project with multiple bundles containing JPA model classes as well as the corresponding persistence.xml. All PUs use JTA as its transaction-type and are connected to the same database (they use the same DataSource).
When manipulating entities I use different EntityManagers and everything is working fine as long as I use an XADataSource. My thinking now is that since they use the same database and the same transaction-manager XA transactions shouldn't be necessary. Though if I switch to a plain DataSource I start seeing inconsistencies in case of rollbacks.
I looked through the specs but couldn't find anything related to this. Does anyone have a pointer whether XA transactions are required as part of such a setup?
Thanks, Philipp