I have 2 EARs 1_EAR and 2_EAR (they have websearvices and other code). Now I have 1 DB_prj project that is used to interact with the database. Now all projects 1_EAR, 2_EAR, DB_prj have persistence.xml in their corresponding meta -inf. Now only 1_EAR and 2_EAR have web.xml. 2_EAR is a new project developed by our team. 1_EAr works fine. Now, when I try to delete any record using the class developed that I posted in 2_EAR, my code freezes and time. To delete a record, I call the API from DB_prj, which works fine when called from 1_EAR.In web.xml from 1_EAR and 2_EAR I have in common. web.xml 1_EAR has many other things that are not in web.xml 2_EAR.
<persistence-context-ref>
<persistence-context-ref-name>persistence/XYZPersist</persistence-context-ref-name>
<persistence-unit-name>XYZPersist</persistence-unit-name>
</persistence-context-ref>
Can someone help me in solving this problem? The above code, which I posted in web.xml 2_EAR, after somone answered my @ problem with JNDI
source
share