1 Reply Latest reply on Aug 12, 2008 5:28 AM by Andrew Rubinger

    Patch to MappedReferenceMetadataResolverDeployer fixes EJB3,

    Andrew Rubinger Master

      Issue is:

      http://jira.jboss.org/jira/browse/EJBTHREE-1455

      EJB References and EJB Local References need to map to the interface-specific proxy to be equipped with proper information for SessionContext.getInvokedBusinessInterface.

      However, EJB2 has no "interface-specific" Proxies.

      So how can I determine which spec version is being used so I can take the appropriate action?

      Patch is:

      Index: server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java
      ===================================================================
      --- server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java (revision 76968)
      +++ server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java (working copy)
      @@ -883,7 +884,8 @@
       {
       cdmd.addDependency(target);
       // Need to look at the local jndi name
      - String localJndiName = target.getBeanMetaData().determineLocalJndiName();
      + String localInterface = ref.getLocal();
      + String localJndiName = target.getBeanMetaData().determineResolvedJndiName(localInterface);
       if(localJndiName != null)
       ref.setResolvedJndiName(localJndiName);
       }
      @@ -969,7 +971,8 @@
       // Determine the jndi name for the reference interface
       String iface = getInterface(ref);
       //LegacyEjb3JndiPolicy policy = new LegacyEjb3JndiPolicy();
      - String containerJndiName = target.getBeanMetaData().determineJndiName();
      + String businessInterface = ref.getRemote();
      + String containerJndiName = target.getBeanMetaData().determineResolvedJndiName(businessInterface);
       if(containerJndiName != null)
       ref.setResolvedJndiName(containerJndiName);
       }


      This breaks smoke-tests for EJB2.x, but passes my EJB3 defining test case.

      S,
      ALR