Honing in on the good stuff

CDI 1.1 Public Review Draft surfaces

Chris Mayer

The innovative Java EE specification that simplified web-application development is showing steady progress

JSR 299, Contexts and Dependency Injection for the Java EE platform, was undoubtedly a gamechanger, enriching enterprise applications with new services.

The team behind the introduction of CDI features recognised its importance to the entire Java canon, in a world moving ever closer to the web. Designed as the bridge between EJB in the backend and JavaServer Faces in the front, CDI quickly became the most talked about part of Java EE 6 in 2009.

Work extending CDI beyond 1.0 started in April 2011, and this past week we saw a Public Review draft appear through the JCP, in line with their target of Java EE 7 next year.

Spec Lead Pete Muir told further of the progress on his blog, stating that CDI 1.1 wouldn’t add “any major new features” and would focus on “honing 1.0”. Muir lists a number of improvements such as:

  • The CDI class, Which provides programmatic access to CDI facilities from outside a managed bean

  • Ability to veto beans declaratively using @ vetoed

  • Conversations in servlet requests

  • Application lifecycle events in Java EE

  • Injection of Bean metadata into bean instances

  • Programmatic access to a container provided Producer Injection target AnnotatedType

  • Ability to override attributes of a Bean via BeanAttributes

  • Ability to process modules via ProcessModule

  • Ability to wrap the Injection Point

  • Honor WEB-INF/classes/META-INF/beans.xml to activate WEB-INF/classes in a bean archive

  • Global ordering and enablement of interceptors and decorators

  • Global selection of alternative

  • New @ deprecated

  • Clarify interceptors and decorators must be implemented using proxying

  • Allow multiple types annotated with Java class

  • Allow extensions to specify the annotations that they are interested in

The team behind CDI 1.1 are encouraging developers to offer feedback on the Public Draft, but also areas which need to be discussed in CDI 2.0. This includes topics such as bean visibility, startup events and CDI scanning, which Muir details further in the blogpost.

The Public Review Ballot on the specifics of JSR 346 begins on 4th December, so there’s not much time to get your opinion heard. Head over the mailing list to express your views on how CDI 1.1 is shaping up.

Whilst there’s nothing as revolutionary as its initial splash, CDI 1.1 is a sensible refinement of the popular component for the next major EE release.

Inline Feedbacks
View all comments