2 Replies Latest reply on Apr 30, 2002 7:36 AM by ionel

    ejb-ref found in both ejb-jar.dtd and jboss_3_0.dtd

      Hi,

      I'm facing a problem with JBoss to bind local jndi name to CMP using a session facade bean (see previous post)

      I'm studying the differents DTD's to see if I make no mistake and I noticed that the tags <ejb-ref> and <ejb-ref-name> are present in both ejb-jar.dtd and jboss_3_0.dtd.

      Do I need to use the both reference ?
      Is it a source of problem ?
      If not and for personnal knowledge only, why is it located in the two files ?

      thanks,
      ionel

        • 1. Re: ejb-ref found in both ejb-jar.dtd and jboss_3_0.dtd
          blaine

          They are cross-references. ejb-jar.xml defines the
          requirement of what code occurrences of the ejb-ref-name
          must resolve to (interfaces and bean type). jboss.xml
          maps that entry to a JNDI name for final resolution.
          (If you use ejb-link in ejb-jar.xml, then the stuff in
          jboss.xml is unnecessary and JNDI is not used).

          See the JNDI section of the Jboss guide.

          • 2. Re: ejb-ref found in both ejb-jar.dtd and jboss_3_0.dtd

            i've added :

            ...
            <ejb-local-ref>
            <ejb-ref-name>ejbcal/PersonneRef</ejb-ref-name>
            <jndi-name>ejbcal/LocalPersonne</jndi-name>
            </ejb-local-ref>


            (ejbcal/LocalPersonne is the <local-jndi-name> of my CMP bean)

            in the JBoss.xml file and JBoss complained that no <ejb-link> tag was present in the ejb-jar.xml.

            I added it and it works fine now (i can bind to java:/comp/env/ejbcal/PersonneRef from my facade bean to hit the local CMP bean).


            thanks for your help,
            it puts me on the right lane

            ionel