I think JTA or Local resource for Persistence Context is determine at the time we create PU in persistence.xml.
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="manager1" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/DefaultDS</jta-data-source>
</persistence-unit>
</persistence>
If we use @PersistenceContext successfully then it mean we declared Container Manage Entity Manager with JTA transaction.
extract from EJB 3 Persistence API (Apress)
When the transaction-scoped entity manager in stateless bean. If that is the case, how can it work with a persistence context? The answer lies with the JTA transaction.
All container managed entity managers depend on JTA transactions. The reason for this is because they can use the transaction as a way to track persistence contexts. Every time an operation is invoked on the entity manager, it checks to see if a persistence context is associated with the transaction. If it finds one, the entity manager will use this persistence context. If it doesn�t find one, then it creates a new persistence context and associates it with the transaction. When the transaction ends, the persistence context goes away.