:numbered!:
["preface",sectnum="0"]

== Preface

=== Evaluation license

include::license-${license}.asciidoc[]

=== Foreword

Contexts and Dependency Injection 1.1 (JSR-346) is an update to Contexts and Dependency Injection 1.0 (JSR-299). A full changelog can be found in the link:$$https://issues.jboss.org/sr/jira.issueviews:searchrequest-printable/12314424/SearchRequest-12314424.html?tempMax=1000$$[issue tracker].

=== Major changes 

These major changes have been introduced for CDI 1.1:

* Add global enablement of interceptors (see the Java Interceptors Specification 1.2), global enablement of decorators (see <<enabled_decorators_priority>>) and alternatives (see <<unsatisfied_and_ambig_dependencies>>) using the +@Priority+ annotation
* Add support for +@AroundConstruct+ lifecycle callback for constructors (see the Java Interceptors Specification 1.2)
* Allow binding interceptors to constructors
* Moved interceptor binding to interceptors spec, allowing for reuse by other specifications
* Support decorators on built in beans (see <<decorators>>)
* Add +EventMetadata+ (see <<event_metadata>>) to allow inspection of event metadata
* Add +@Vetoed+ annotation allowing easy programmatic disablement of classes (see <<what_classes_are_beans>>
* Many improvements for passivation capable beans, including +@TransientReference+ allowing instances to be retained only for use within the invoked method or constructor (see <<passivation_capable_injection_points>> and <<passivating_scope>>)
* Add scope activation and destruction callback events (see <<builtin_contexts>>)
* Add +AlterableContext+ allowing bean instances to be explicitly destroyed (see <<context>>)
* Add automatic enablement of CDI for beans with a scope annotation, and EJBs, in Java EE (see <<bean_archive>>)
* Add class exclusion filters to +beans.xml+ to prevent scanning of classes and packages (see <<exclude_filters>>)
* Add +Unmanaged+ allowing easy access to non-contextual instances of beans (see <<bm_obtain_unmanaged_instance>>)
* Add +CDI+ allowing easy access to the current CDI container (see <<provider>>)
* Add +AfterTypeDiscovery+ event, allowing extensions to register additional types after type discovery (see <<atd>>)
* Add +@WithAnnotations+ as a way of improving extension loading performance (see <<pat>>)
* Many minor improvements to portable extensions (see <<spi>>)

:numbered:

