1 Reply Latest reply on Oct 16, 2003 7:40 AM by Vishal Sharma

    local-ref between beans from different jar files

    morten Matras Newbie

      I'm trying to figure out how to make a local reference between a bean from one jar-file to another bean from another jar file.

      As I understand it the following must be done:

      1) Make a <local-ref>... definition in the ejb-jar file with the calling bean: Like the following:
      <ejb-local-ref>
      <ejb-ref-name>Stranger</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>strange.StrangerLocalHome</local-home>
      strange.StrangerLocal
      <ejb-link>Strange</ejb-link>
      </ejb-local-ref>
      2) Write a jboss.xml file with a statement, that states where the local-reference should point to:
      <ejb-ref-name>Stranger</ejb-ref-name>
      <local-jndi-name>StrangerLocal</local-jndi-name>
      </ejb-local-ref>
      and add it to the jar file in which the calling bean is placed.
      3) Add both jar files to one ear file and deploy that.
      ...

      Please help me fill out this list. It seems to a problem many users have, so please guide me to places where I can see how this is done. (I'm even willing to pay for a book if that's neccesary.)