3 Replies Latest reply on May 5, 2008 7:57 PM by starksm64

    How to Resolve JNDI Name from beanInterface?

    alrubinger

      I have:

      java.lang.AssertionError: mappedName for enc env/org.jboss.ejb3.test.ejbthree1154.DelegateBean/home is null


      with:

      [AnnotatedEJBReferenceMetaData{name=home,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=null,beanInterface=interface org.jboss.ejb3.test.ejbthree1154.TestLocalHome}


      Are we currently hooked up enough so that I can do a:

      Something.resolveContainer(beanInterface).getJndiName();


      ?

      This is on the ejbthree1154 test (among others).

      S,
      ALR


        • 1. Re: How to Resolve JNDI Name from beanInterface?
          alrubinger

          Note: The psudocode in my previous post was for a Home.

          • 2. Re: How to Resolve JNDI Name from beanInterface?
            starksm64

            No, from the "jndi name issues" thread:
            http://www.jboss.com/index.html?module=bb&op=viewtopic&t=134618

            and the last tck call, we seemed to agree on the container having a jndi name, and the proxies accessible under jndi-name/interface-name with the special interface-names home, remote, local, local-home for the legacy 2.1 views.

            We still need a getResolvedJndiName on the JBossEnterpriseBeanMetaData if we are going this route, but was waiting to see if it was doable. Carlo had a question on whether or not this would be handled correctly by the proxy layer and associated jndi object name factory binding.

            • 3. Re: How to Resolve JNDI Name from beanInterface?
              starksm64

              So I am going to add a non-managed getResolvedJndiName(String iface) to the JBossEnterpriseBeanMetaData so that there is a stable api to call. This will be implemented to use the default jndi policy if set, the following default implementation if not set:

              - String getJndiName(EjbDeploymentSummary summary) : return the ejb resolved jndi name or mapped name.
              - String getDefaultRemoteJndiName(EjbDeploymentSummary summary) : returns getJndiName(summary) } + "/remote"
              - String getDefaultRemoteHomeJndiName(EjbDeploymentSummary summary) : returns getJndiName(summary) } + "/home"
              - String getDefaultLocalHomeJndiName(EjbDeploymentSummary summary) : returns getJndiName(summary) } + "/local-home"
              - String getDefaultLocalJndiName(EjbDeploymentSummary summary) : returns getJndiName(summary) } + "/local"