Friday Jun 07, 2013

What's New in CDI 1.1?

Introduced in Java EE 6, CDI is clearly a key API to standardize dependency injection in enterprise Java. A lot of the work related to CDI in Java EE now involves treating CDI as an effective mechanism for unifying the Java EE component model and aligning others specs around it to make for a more cohesive platform. Examples of this on-going effort in Java EE 7 includes aligning the JSF component model/scoping to CDI, decoupling declarative transactions from the EJB component model through the JTA 1.2 @Transactional CDI interceptor, modernizing the JMS 2 API utilizing CDI, better support for CDI in Bean Validation 1.1 and many others.

CDI 1.1 itself is a point release that has a relatively long list of smaller but nonetheless important fixes and enhancements. In a recent blog post, CDI 1.1 specification lead Pete Muir does a good job of listing out the changes. The post is especially valuable for the referenced links that you can dig into to see if any of the changes are immediately useful to you if you have adopted CDI already.

Wednesday May 29, 2013

An Overview of JASPIC 1.1 Changes in Java EE 7

It's easy to focus on just the big ticket changes in Java EE 7 such as WebSocket, JSON-P, JMS 2, JAX-RS 2, Java Batch, Concurrency Utilities and so on but there's actually a lot more going on pretty much across the board. One such set of important but easy to overlook changes are in JASPIC 1.1 (JSR 196).

In a very well written blog post, Arjan Tijms goes over the changes. He talks about the context/motivation for each change along with the technical details and sample code. He also references the very handy change log for JASPIC 1.1. It's a great read if you are interested in Java EE security.

Tuesday Apr 09, 2013

JMS 2, Bean Validation 1.1, JBatch, JSON-P Go Final!

Java EE 7 is almost to the finish line! The first slew of Java EE 7 JSRs have successfully passed their Final Approval Ballots and are now final. JMS 2 (JSR 343), Bean Validation 1.1 (JSR 349), JBatch (JSR 352), and JSON-P (JSR 353) all passed with near unanimous support from the JCP Executive Committee. Please join me in congratulating spec leads Nigel Deakin of Oracle, Emmanuel Bernard of Red Hat, Chris Vignola of IBM, and Jitendra Kotamraju of Oracle on the fruition of all their hard, often thankless work.

We expect more Java EE 7 JSRs to follow suit shortly, so stay tuned. This is a great time to read the final specs and start experimenting with them in the GlassFish 4 builds.

Monday Nov 26, 2012

Pete Muir Interview on CDI 1.1

The 109th episode of the Java Spotlight podcast features an interview with CDI 1.1 spec lead Pete Muir of JBoss/Red Hat. Pete talks with Roger Brinkley about the backdrop to CDI, his work at JBoss, the features in CDI 1.1 and what to expect in the future.

What's going on behind the scenes and the possible contents for CDI 1.1+ are particularly insightful. You can listen to the full interview here.

Monday Nov 19, 2012

CDI 1.1 Public Review and Feedback

CDI 1.1 is humming along nicely and recently released it's public review draft. Although it's just a point release, CDI 1.1 actually has a lot in it. Some the changes include:

  • 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, InjectionTarget, AnnotatedType
  • Ability to override attributes of a Bean via BeanAttributes
  • Ability to process modules via ProcessModule
  • Ability to wrap the InjectionPoint
  • 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 alternatives
  • @New deprecated
  • Clarify interceptors and decorators must be implemented using proxying
  • Allow multiple annotated types per Java class
  • Allow Extensions to specify the annotations that they are interested in

The CDI 1.1 expert group has a number of open issues that they would like immediate feedback on. These include critical issues like bean visibility, startup events and restricting CDI scans. Read the details here and let your voice be heard!