5 Replies Latest reply on Sep 17, 2002 4:17 AM by Rune Teigen

    does JBoss support ejb-local-ref in web.xml?

    Ernst Newbie

      Hello,

      I'm trying to have a servlet link to a local EJB. Here is the relevant web.xml declaration I have in test.war:
      <ejb-local-ref>
      <ejb-ref-name>CanliiPublicationBrokerEJB</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>org.canlii.ejb.CanliiPublicationBrokerLocalHome</local-home>
      org.canlii.ejb.CanliiPublicationBrokerLocal
      <ejb-link>CanliiPublicationBrokerEJB</ejb-link>
      </ejb-local-ref>

      Here is the relevent section in ejb-jar.xml located in my jar module named canliidb.jar:


      <display-name>CanliiPublicationBrokerEJB</display-name>
      <ejb-name>CanliiPublicationBrokerEJB</ejb-name>
      <local-home>org.canlii.ejb.CanliiPublicationBrokerLocalHome</local-home>
      org.canlii.ejb.CanliiPublicationBrokerLocal
      <ejb-class>org.canlii.ejb.CanliiPublicationBrokerEJB</ejb-class>
      <session-type>Stateful</session-type>
      <transaction-type>Container</transaction-type>
      <security-identity>

      <use-caller-identity></use-caller-identity>
      </security-identity>


      When I deploy these modules separatly I get the following error:

      org.jboss.deployment.DeploymentException: ejb-local-ref: CanliiPublicationBrokerEJB, target not found, add valid ejb-link; - nested throwable: (javax.naming.NamingException: ejb-local-ref: CanliiPublicationBrokerEJB, target not found, add valid ejb-link)

      I even tried to package these modules together in an ear but I get the same error. Am I doing something wrong? Does JBoss support local references to EJBs in servlets?
      Thanks,