<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1442274565193_6303" class="">I'm working with jboss wildfly 9. I have a provider deployed as module into the &nbsp; modules &nbsp;directory.</div><div id="yui_3_16_0_1_1442274565193_6303" class="">Then i have a jpa project with DAO pattern writing and reading inside my database. I want to handle the DAO transaction using JTA but in order to make the DAO class visibile to myprovider i need to put the DAO JPA project inside the modules directory too.</div><div id="yui_3_16_0_1_1442274565193_6303" dir="ltr" class="">Now i m facing &nbsp;the real problem: it seems i cannot use the PersistenceContext annotation to inject the entity manager into my EntityManager variable wich is always null. Why i cannot inject the a context into a jar modules? What am i wrong?</div></div></body></html>