1 2 Previous Next 17 Replies Latest reply on May 5, 2008 8:16 PM by alrubinger Go to original post
      • 15. Re: jndi name issues
        wolfc

        I'll only cover @EJB on class level, because method and field just add beanInterface and name to the mix.

        @EJB(name="ejb1", mappedName="refs/client/EJB1")

        Should create java:comp/env/ejb1 -> refs/client/EJB1.
        @EJB(name="ejb1")

        Is illegal.
        @EJB(name="ejb1", beanInterface=IFace1.class)

        Should first look in the current deployment unit for a bean implementing IFace1, then sibling deployments, then parent sibling deployments (who should look into child deployments) recursively. By spec this stops at JavaEE application level.
        @EJB(name="ejb1", beanName="Ejb2Bean")

        Should first look in the current deployment unit for a bean named "Ejb2Bean", then sibling deployments, then parent sibling deployments (who should look into child deployments) recursively. By spec this stops at JavaEE application level.
        @EJB(name="ejb1", beanName="../myjar.jar#Ejb3Bean")

        Looks in sibling deployment "myjar.jar" for a bean named "Ejb3Bean".

        By now the reference should be resolved and the bean.mappedName should be inserted in the ejb.mappedName. If not, loud warning or exception.

        • 16. Re: jndi name issues
          starksm64

          This is an algorithm, not an api. I need the api on the metadata layer we agree to use for dependency resolution and when the proxy goes to actually bind into jndi.

          • 17. Re: jndi name issues
            alrubinger

            My problems with Proxies and Scott's with JNDI Metadata have converged here.

            The solution that will enable us to further decouple and get resolution more in-line with the current direction is to add the "resolvedJndiName" property accessors to JBossEnterpriseBeanMetaData, effective metadata-1.0.0.Beta12.

            From there we can make another step towards decoupling the Proxy/ProxyFactory components from the Containers (read: EJB3 Core).

            It'll then be the responsibility of the MappedReferenceMetaDataResolverDeployer to properly resolve the JNDI name in the case of @RemoteBinding overrides.

            An issue exposed here is that @RemoteBindings(Array) is non-deterministic at the class level in the case that more than one interface is defined on the bean. For now, I'll assume that each @RemoteBinding in the specified array should be used on each of the business interfaces (creating multiple bindings).

            Still to be covered is the handling of "getInvokedBusinessInterface()" under this mechanism, I'm looking into those tests now.

            S,
            ALR

            1 2 Previous Next