1 Reply Latest reply on Oct 2, 2014 1:56 PM by wdfink

    JBoss 7.1.1 Ear EJB Lookup

    stonesoft

      I am having a problem with EJB lookup in an ear. 

       

      This is the structure of my ear.  I use isolation = false.
      AA.ear
          AA.war
          BB.jar
          /lib/CC.jar

       

      AA.war has a dependency on BB.jar
      BB.jar has a dependency on CC.jar (needs to invoke an EJB in CC.jar)

       

      AA.war jboss-deployment-structure is:
      <?xml version="1.0"?>
      <jboss-deployment-structure>
           <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
           <deployment>
                 <dependencies>
                     <module name="javax.ejb.api" export="true"/>
                     <module name="javax.jws.api" export="true"/>
                      (more after this)
                 </dependencies>
           </deployment>
           <sub-deployment name="AA.war">
                 <dependencies>
                       <module name="javax.servlet.jstl.api"/>
                       (more after this)

       

                       <module name="deployment.AA.ear.BB.jar"/>
                  </dependencies>
            </sub-deployment>
      </jboss-deployment-structure>

       

      DD.jar (external to AA.ear) has a dependency on AA.ear.BB.jar

       

      <?xml version="1.0"?>
      <jboss-deployment-structure>
           <deployment>

                 <dependencies>
                      <module name="javax.annotation.api"/>
                      (more after this)

       

                      <module name="deployment.AA.ear.BB.jar"/>
                 </dependencies>
          </deployment>
      </jboss-deployment-structure>

       

      Ok, now the problem.

       

      If  CC.jar is in the lib folder,  BB.jar cannot lookup an EJB in CC.jar
      If I move BB.jar out of the lib folder to the same level as AA.war then the EJB lookup works but the external DD.jar can no longer see BB.jar

       

      Any ideas?