1 Reply Latest reply on Oct 24, 2005 9:27 AM by fwesterop

    missing ejb-local-ref section in jboss-web.xml

    fwesterop

      Hi,

      I'm strugling with XDoclet. I'm using JBossIDE to generate deployment descriptors for accessing a session bean from a servlet using it's local interfaces. I can't find the correct Xdoclet tag to use in my servlet to generate a correct jboss-web.xml file. This is what I've got:

      /**
       * Servlet Class
       *
       * @web.servlet name="Compute"
       * display-name="Compute"
       * description="Computes Fibonaci numbers 0..n for a given number n."
       *
       * @web.servlet-mapping url-pattern="/Compute"
       *
       * @web.ejb-local-ref name="ejb/myFibo"
       * description = "Reference to a bean that calculates Fibonaci numbers."
       * type="Session"
       * local="tutorial.interfaces.FiboLocal"
       * home="tutorial.interfaces.FiboLocalHome"
       *
       * @jboss.ejb-ref-jndi ref-name = "ejb/myFibo"
       * jndi-name = "FiboLocal"
       *
       *
       */
      public class ComputeServlet extends HttpServlet {
       ...
      }
      


      This (ofcourse) results in the following stuff in my jboss-web.xml file:

      <jboss-web>
      
       (...)
      
       <!-- EJB References -->
       <!--
       For additional ejb-ref tags add a merge file called jbossweb-ejb-ref.xml
       -->
       <ejb-ref>
       <ejb-ref-name>ejb/myFibo</ejb-ref-name>
       <jndi-name>FiboLocal</jndi-name>
       </ejb-ref>
      
       <!-- EJB Local References -->
      
      </jboss-web>
      


      Instead of the wanted:

      <jboss-web>
      
       (...)
      
       <!-- EJB References -->
       <!--
       For additional ejb-ref tags add a merge file called jbossweb-ejb-ref.xml
       -->
      
       <!-- EJB Local References -->
      
       <ejb-local-ref>
       <ejb-ref-name>ejb/myFibo</ejb-ref-name>
       <local-jndi-name>FiboLocal</local-jndi-name>
       </ejb-local-ref>
      
      </jboss-web>
      


      I understand the problem lies with the @jboss.ejb-ref-jndi tag, which only gets a remote jndi reference generated.

      What is the correct XDoclet tag to get a local jndi reference in my jboss-web.xml?