I am on a WebSphere to JBoss migration project. We have a web application (call it WEB_A) that has EJB references to another EAR (call it EJB_B) deployed in the same server. WEB_A needs to be deployed before EJB_B to load cache. However, since WEB_A has EJB references in both web.xml and jboss-web.xml, it wants the EJBs in EJB_B to be available during deployment. If EJB_B isn't deployed, WEB_A fails during deployment complaining about missing/unavailable dependencies.
Any clues on how to deal with the above situation?
Server: JBOSS EAP 6.4
Deployment Error (edited for privacy)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014544: No EJB found with interface of type 'com.test.MyEJBMgrHome' for binding java:module/env/ejb/MyEJBMgr"},
"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"APP.ear\".deploymentCompleteService is missing [jboss.deployment.subunit.\"APP.ear\".\"APP.war\".deploymentCompleteService]"]
The answer was to do the lookup using the JBoss JNDI in the code vs. using the local JNDI in the web.xml and jboss-web.xml. The references were also removed from the web.xml and jboss-web.xml.