Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1802

AbstractEjbReferenceValueMetadata doesn't handle UnresolvableReferenceException while resolving EJB reference

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.1.4
    • 1.1.3
    • mc-int
    • None

      During release of EJB 1.1.3 and even on trunk, its observed that the Ejb3IntoMcBeanInjectionTestCase fails frequently. The reason is because of a bug in AbstractEjbReferenceValueMetadata.

      AbstractEjbReferenceValueMetadata.getTargetJndiName iterates through all the deployment units but doesn't handle the UnresolvableReferenceException which is thrown as per contract by the EjbReferenceResolver.resolveEjb. As a result, if the first deployment unit in the list of DUs can't resolve the EJB reference, then the AbstractEjbReferenceValueMetadata doesn't move to the next DU.

      // Loop through each DeploymentUnit
      if (dus != null)
      {
      for (DeploymentUnit du : dus)
      {
      // Ensure it's an EJB3 DU (by looking for the processed metadata)
      if (du.getAttachment(AttachmentNames.PROCESSED_METADATA, JBossMetaData.class) == null)

      { continue; }

      // Try to resolve
      jndiName = resolver.resolveEjb(du, reference);

      // If we've resolved here, we're done
      if (jndiName != null)

      { break; }

      }
      }

              jaikiran Jaikiran Pai (Inactive)
              jaikiran Jaikiran Pai (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: