<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_3409">I'm working with jboss wildfly 9. I have a provider deployed as module into the modules directory.</div><div id="yui_3_16_0_1_1442274565193_3409">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 class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_1_1442274565193_3592" style="display: block;"><div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;" id="yui_3_16_0_1_1442274565193_3591"><div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1442274565193_3590"><div class="y_msg_container" id="yui_3_16_0_1_1442274565193_3604"><div id="yiv3163088082"><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;" id="yui_3_16_0_1_1442274565193_3603"><div id="yiv3163088082yui_3_16_0_1_1442274028614_2277" class="yiv3163088082"><br class="yiv3163088082"></div><div id="yiv3163088082yui_3_16_0_1_1442274028614_2277" class="yiv3163088082">Now i m facing the real problem: it seems i cannot use the PersistenceContext annotation to inject the entity managare into my EntityManager variable wich is always null.</div><div id="yiv3163088082yui_3_16_0_1_1442274028614_2277" class="yiv3163088082"><br></div><div id="yiv3163088082yui_3_16_0_1_1442274028614_2277" class="yiv3163088082"><br class="yiv3163088082"></div><div id="yiv3163088082yui_3_16_0_1_1442274028614_2277" class="yiv3163088082">Why i cannot inject the a context into a jar modules? What am i wrong?</div><div dir="ltr" class="yiv3163088082" id="yiv3163088082yui_3_16_0_1_1442274028614_2441"><br class="yiv3163088082"></div></div></div><br><br></div> </div> </div> </div> </div></body></html>