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

Possible misintepretation of spec regarding Unproxyable bean types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      OWB seems to throw an exception for all unproxyable normal scoped beans. I think that this might be incorrect.

      The specification says the "A bean type must be proxyable if an injection point resolves to a bean", not that all the types of the bean must be proxyable. In other words, as long as the bean is a legal bean, and all injection point resolving to this bean is a proxyable type - no exception should be thrown.

      In the part about contextual references, there is further indications that unproxyable types should be allowed in the set of types for the bean. It's only when you try to get a reference(injected or by bean manager) to an unproxyable type, and the bean must be proxied (normal scoped, intercepted or decorated) an exception should thrown.

      Also, the Weld user guide suggests introducing an interface as a solution to having an unproxyable bean.

      The current OWB implementation makes a pattern of having an interface and (one or more) implementation class with final fields/methods somewhat difficult

      Attachments

        Activity

          People

            struberg Mark Struberg
            alexander.s.larsen@gmail.com Alexander Larsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: