Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-630

AmbiguousResolutionException thrown for Decorators that Decorate multiple beans where any of those beans are passivation capable.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.2
    • 1.1.3
    • None

    Description

      BeansDeployer generally does the right thing and doesn't attempt to ensure that @Delegate injection points only resolve to a single bean.

      However, if you have a Decorator that decorates a passivating scope bean (@SessionScoped, @ConversationScoped, etc), then as part of validating that the Decorator is also passivization capable we call into WebBeansUtil isPassivationCapableDependency(InjectionPoint injectionPoint)

      That method attempts to resolve the InjectionPoint to ensure it resolves to a bean that can be passivated, but it should not attempt to do this for injection points containing @Delegate as by definition those can resolve to multiple beans. In fact, we will never even get to this point if we were not decorating a passivization capable bean.

      I have a unit test that re-creates this problem, and I believe there is a very simple fix to WebBeansUtil to check for the @Delegate annotation on the injection point.

      Attachments

        Activity

          People

            bergmark Joseph E Bergmark
            bergmark Joseph E Bergmark
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: