I am using JBoss AS 7.1.1 and able to configure a new JTA datasource and wire it to my EJB using
@PersistenceContext(unitName=\"TestPU\")
private EntityMana
JTA : In Java EE environment, transactions are managed by the container & by default its JTA
transaction. You can get entity manager by lookup or injection.
RESOURCE_LOCAL : In Java SE, application have to manage transactions explicitly & resource local transactions are native transactions. You have to create EntityManagerFactory
& then can create entity manager from it.
As you are deploying it in application server, change the transaction-type
to JTA
in persistence.xml.