CDIFeatures72

CDI Enhancements Functional Specification

Author: Denis Anisimov
Version: draft 0.0.1

Disclaimer: The content of this NetBeans development wiki page is intended for pre-planning purposes ONLY. The development, release, and timing of any feature or functionality described here should not be treated as final, and is subject to change at any time at the sole discretion of Oracle. For information about NetBeans software releases please visit the NetBeans Roadmap or the NetBeans Release Planning wiki.

CDI Errors This enhancement is about unquestionable errors in CDI based code which will be detected at the runtime. Such errors should be underlined and has an error mark on the editor left bar. Below is the full list of such errors.

  • Managed bean declaring a passivating scope must be passivation capable. See issue 207094 . done
  • Eligible for injection result for any injection point:
    • Classes which don't have a non-private constructor with no parameters and not annotated with @Inject
    • Not a non-static inner class.
    • Abstract class ( if it is not @Decorator ).
    • Implements javax.enterprise.inject.spi.Extension.
    • Unproxyable declared types : Injectables with normal scope that have final methods defined in bean type of injection point.
  • Bean type with @Specializes annotation should directly extends bean class of another managed bean.
  • There are should be exactly one disposer methods for a single producer method ( no multiple disposers per producer and each disposer should have producer).
  • For each bean there could be at most one enabled specializes bean.

Warnings

  • The following list of warnings contains not recommended CDI usage by spec ( in case of violation result has non-portable behavior ):
    • The use of @Named as an injection point qualifier is not recommended. done
    • An interceptor or decorator should have only @Dependent scope. Otherwise non-portable behavior results. done
    • An interceptor or decorator should not have a name ( @Named should not be declared by the class ). Otherwise non-portable behavior results. done
    • An interceptor or decorator should not be alternative. Otherwise non-portable behavior results. done
    • A stereotype should not declare any qualifier annotation other than @Named. Otherwise non-portable behavior results. done
    • A stereotype should not be annotated @Typed. Otherwise non-portable behavior results. done
    • An interceptor or decorator shouldn't have @Specializes annotation. Otherwise non-portable behavior results. done
    • Array-valued or annotation-valued members of a qualifier type should be annotated @Nonbinding. Otherwise non-portable behavior results. done
    • Array-valued or annotation-valued members of an interceptor binding type should be annotated @Nonbinding. Otherwise non-portable behavior results. done


CDI Extensions Investigate the existed CDI extensions ( and possible support for their creations ) and plan features for their support : TBD

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo