Bio
Gavin King is a Distinguished Engineer at Red Hat. He's the creator of Hibernate, a popular persistence solution for Java and of the Ceylon programming language. He contributed to the Java Community Process as JBoss and then Red Hat representative for the EJB and JPA specifications and as spec lead and author of the CDI specification. He's currently a major contributor to the design of Jakarta Data and Jakarta Persistence. He lives in Barcelona with his wife and three daughters. His active interests include theoretical physics and quantum technologies.
Tags
Authors
CDI Portable extension examples
One of the nicest features of CDI is the portable extension SPI. According to the spec:
Andy Schwartz's JSF2 summary
In case you're like me, and you missed this when it was first published, check out Andy Schwartz's summary of what's new in JSF2. (Andy's one of the good guys on the JSF EG.) It's fun to compare the final product to my wishlist from back in '07. Oh, what innocent, carefree days...
Granite DS and CDI
William Drai has blogged about his experience integrating Granite DS and CDI.
Modular dependencies
Cool
Pace of change
The question of backward compatibility is something that all framework developers wrestle with. The term means different things to different people:
JSR-299 Final Draft Submitted
Today, Red Hat submitted the final draft of JSR-299[1], which now goes under the moniker CDI (Contexts and Dependency Injection), along with the Reference Implementation and TCK. Check out the spec[1] and Javadoc.
Writing a properties file in Java?
I just noticed that CDI makes it possible to write properties files in Java, instead of plain text. I'm not sure if this is useful, but it is cute.
CDI Javadoc
I put a whole bunch of work into the Javadoc for CDI recently. You can see it here. There's a good overview of the spec in the package doc for javax.enterprise.inject.
In my previous little rant, I showed you how to use @Alternative and alternative stereotypes to easily change bean implementations based upon deployment scenario. But that's not the end of the story. There's two other things I would sometimes like to be able to change at deployment time: