3 Replies Latest reply on Feb 27, 2003 3:03 PM by Adrian Brock

    servlet in one ear referencing ejb in another ear

    Niklas Nobel Newbie

      Given the following taken from chapter j2ee.8, "Application Assembly and Deployment":

      app1.ear:
      ejb1.jar Class-Path: ejb1_client.jar
      deployment descriptor contains:
      <ejb-client-jar>ejb1_client.jar</ejb-client-jar>
      ejb1_client.jar
      app2.ear
      ejb1_client.jar
      ejb2.jar Class-Path: ejb1_client.jar
      webapp.war
      webapp.war
      WEB-INF/lib/servlet.jar
      WEB-INF/lib/ejb1_client.jar

      A servlet class in servlet.jar is then trying to "JNDI look up" the home interface of a component in the ejb1.jar module which gives javax.naming.NameNotFoundException: ejb not bound.

      Adding an <ejb-local-ref> entry in web.xml will instead give a deploytime error saying that the ejb/component could not be found.

      If I package the whole shebang into one ear it works. What am I missing?

      /Niklas