1 Reply Latest reply on Feb 20, 2002 8:49 PM by wchao

    Bean reference with <ejb-link>

    rudi

      I have a session bean in one jar file which uses an entity bean in another jar file. Now I have the problem that I don't know how to define the reference in the <ejb-link> tag in the ejb-jar.xml file of the session bean that I can use the entity bean.

      Here is the code snippet which I used in the ejb-jar.xml file of my session bean. When i deploy the session bean I always get the message: "Can't find the entity bean in this application". Does anybody know what's wrong.

      <ejb-ref>
      <ejb-ref-name>test/TestEntityHome</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      test.EntityHome
      test.Entity
      <ejb-link>entity.jar#EntityEJB</ejb-link>
      </ejb-ref>

        • 1. Re: Bean reference with <ejb-link>
          wchao

          There is no ejb-link. You leave it out. In the jboss.xml file, you create a mapping like so:


          <ejb-name>test/TestEntityHome</ejb-name>
          <jndi-name>myApplication/TestEntityHome</jndi-name>


          You only use ejb-link when the target bean (bean being referenced) is in the same jar file as the source bean (bean using the reference).