If I mention both jta and non-jta datasource in persistence.xml, how will the provider identify what and when to use? Is there a way to enforce usage of non-jta datasource in certain scenario? I am using IBM supported OpenJPA.
Some providers allow to declare both a jta-datasource and a non-jta-datasource and use the later for optimized reading through non-JTA connections (i.e. that won't be associated to an ongoing JTA transaction). How this works and if OpenJPA supports this? Difference between a "jta-datasource" and a " resource-local " datasource?