I've inherited an application and the persistence.xml has this:
<persistence-unit name="nxPersistenceUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>someDSName</non-jta-data-source>
The code uses @PersistenceUnit and @PersistenceContext but I'm reading the for transaction-type="RESOURCE_LOCAL" only @PersistenceUnit should be used. The app appears to be functioning properly and the majority of the time @PersistenceContext is used so I'm confused as to why they didn't use transaction-type="JTA".
I'm reluctant to change working code but we have noted performance issues so I'm wondering if this mixed usage can be contributing to that.