0 Replies Latest reply on May 19, 2002 3:37 AM by Graeme Pyle

    ejb-local-ref between different ears

    Graeme Pyle Newbie

      Hi all,

      I have an EJB with a local interface deployed in an ear. I'd like to deploy a test web client (using Cactus) for it as part of another ear.

      I'm using JBoss 3 RC2 and I can't get the ejb-local-refs to work. Am I correct in saying that ejb-links are irrelevant here (seperate ears)?

      Given that, I am trying to give my local EJB a JNDI name in jboss.xml as below:


      <ejb-name>PersonEJB</ejb-name>
      <jndi-name>hb360/PersonHome</jndi-name>



      This seems to work. I package it in its own ear and it deploys OK.

      In my web.xml for the test client, I include

      <ejb-local-ref>
      <ejb-ref-name>ejb/PersonHome</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>person.PersonHomeLocal</local-home>
      person.PersonLocal
      </ejb-local-ref>

      and the following in the jboss-web.xml:

      <ejb-local-ref>
      <ejb-ref-name>ejb/PersonHome</ejb-ref-name>
      <jndi-name>hb360/PersonHome</jndi-name>
      </ejb-local-ref>

      I then package all this in another ear and try to deploy it. Sadly JBoss complains that:

      09:18:58,895 ERROR [EmbeddedCatalinaServiceSX] Failed to setup web application ENC
      javax.naming.NamingException: ejb-local-ref: ejb/PersonHome, target not found, add valid ejb-link

      What am I doing wrong? Does JBoss support local refs accross seperate EARs?

      Thanks,

      Graeme