2 Replies Latest reply on Oct 4, 2004 3:15 AM by bmnich

    Working with remote->local interfaces

    bmnich

      Hi, I try to connect with the staandalone client to my SessionBean using remote interfaces. Works fine. Then, from this SessionBean I try to obtain the EntityBean/SessionBean using local interfaces, and get an

      javax.naming.NameNotFoundException: MyLocalSessionLocal not bound

      All interface calls are done with the use of xdoclet generated Util classes, with @ejb.util generate="physical" parameter (using JNDI name).
      I also have downloaded the newest xdoclet and have the following reference in jboss.xml
      <ejb-local-ref>
      <ejb-ref-name>ejb/MyLocalSessionLocal</ejb-ref-name>
      <local-jndi-name>MyLocalSessionLocal</local-jndi-name>
      </ejb-local-ref>

      My ejb-jar.xml ref looks like the following:

      <![CDATA[]]>

      <ejb-name>MyLocalSession</ejb-name>

      com.poeware.estate.interfaces.MyLocalSessionHome
      com.poeware.estate.interfaces.MyLocalSession
      <local-home>com.poeware.estate.interfaces.MyLocalSessionLocalHome</local-home>
      com.poeware.estate.interfaces.MyLocalSessionLocal
      <ejb-class>com.poeware.estate.session.MyLocalSession</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>




      this is the Bean I access remotly:

      <![CDATA[]]>

      <ejb-name>EstateManager</ejb-name>

      com.poeware.estate.interfaces.EstateManagerHome
      com.poeware.estate.interfaces.EstateManager
      <ejb-class>com.poeware.estate.session.EstateManagerEJB</ejb-class>
      <session-type>Stateful</session-type>
      <transaction-type>Container</transaction-type>

      <ejb-local-ref >
      <ejb-ref-name>EstateLocal</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>com.poeware.estate.interfaces.EstateLocalHome</local-home>
      com.poeware.estate.interfaces.EstateLocal
      <ejb-link>Estate</ejb-link>
      </ejb-local-ref>

      <ejb-local-ref >
      <ejb-ref-name>MyLocalSessionLocal</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>com.poeware.estate.interfaces.MyLocalSessionLocalHome</local-home>
      com.poeware.estate.interfaces.MyLocalSessionLocal
      <ejb-link>MyLocalSession</ejb-link>
      </ejb-local-ref>




      Any idea what can be wrong? Any example on how to do that would be a great help!
      Great thanks in advance!
      Bartek

        • 1. Re: Working with remote->local interfaces
          darranl

          Have you had a look at JNDI View? 'NameNotFoundException' generally means that you are trying to use a name that is not bound to JNDI.

          • 2. Re: Working with remote->local interfaces
            bmnich

            Thanks so much for the hint!!
            I checked JNDI View and notced, that my Local Beans are bound to the name local/<ejb-name>
            but my xdoclet generated Util class was using JNDI name <ejb-name>Local - and that is why I was getting not bound exception!

            Is there any way to map all that, so the JNDI stays as generated(I was thinking about being a bit more portable) and get rid of this jboss local/<ejb-name> mapping?