4 Replies Latest reply on Feb 2, 2005 1:32 PM by tim5901

    ejb-env-ref and a deployer (person)

    tim5901

      I am developing an application component on jboss 3.2.5. I have been reading about the ejb-env-ref tags that can be used to allow the component to be assigned to a reference which is then connected to something in the global JNDI.

      How do you do that?

      I have been trying to understand it for quite some time now but I am still confused. My first assumption is that the deployer does not need to explode the EJB jar to modify the jboss.xml inside the jar. The deployer should be able to setup the JNDI to have a link that the ejb-env-ref refers to. But I can't figure out how to do that.

      Can someone help?

        • 1. Re: ejb-env-ref and a deployer (person)
          starksm64

          Its done through the jboss.xml descriptor.

          • 2. Re: ejb-env-ref and a deployer (person)
            tim5901

            I'm sorry, but I am really stupid.

            Where is the jboss.xml descriptor located? Do you mean the one in the ejb jar under the META-INF directory? Or do I create one in the actual deploy directory? Or do I create one in the conf where the standardjboss.xml is located?

            • 3. Re: ejb-env-ref and a deployer (person)
              starksm64

              Start with the getting started guides.

              • 4. Re: ejb-env-ref and a deployer (person)
                tim5901

                I went through the Getting Started guide by Luke Taylor, pulled down the demos and went through them.

                So from that I am assuming that the only place the jboss.xml goes is in the META-INF of the ejb.

                Therefore my original assumption must be wrong. I assumed that the purpose of the ejb-ref tags was to allow a system administrator to place the actual interface link someplace in the JNDI directory with some name and have that link to the logical name specified in the ejb-jar.xml.

                In actuallity the ejb-ref is used so that the component does not have to worry about where the container implementation actually binds the interface in the JNDI directory.

                So in the end there is no way for the system administrator to tell the container where to bind the interface other than to unpack the jar and change the jboss.xml <jndi-name> tag.

                Is that correct?