Java News from Monday, July 31, 2006

Jason Carreira has submitted JSR-303, Beans Validation to the Java Community Process. According to the JSR,

Validating data is a common task that is copied in many different layers of an application, from the presentation tier to the persistentce layer. Many times the exact same validations will have to be implemented in each separate validation framework, proving time consuming and error-prone. To prevent having to re-implement these validations at each layer, many developers will bundle validations directly into their classes, cluttering them with copied validation code that is, in fact, meta-data about the class itself.

This JSR will define a meta-data model and API for JavaBean validation. The default meta-data source will be annotations, with the abilty to override and extend the meta-data through the use of XML validation descriptors. It is expected that the common cases will be easily accomplished using the annotations, while more complex validations or context-aware validation configuration will be available in the XML validation descriptors.

The validation API developed by this JSR will not be specific to any one tier or programming model. It will specifically not be tied to either the web tier or the persistence tier, and will be available for both server-side application programming, as well as rich client Swing application developers. This API is seen as a general extension to the JavaBeans object model, and as such is expected to be used as a core component in other specifications, such as JSF, JPA, and Bean Binding.


Charles Cook has released Blue Pelican Java, a textbook aimed at high school students preparing for the AP exam in computer science. As well as paper, the book is freely (as-in-beer) available online in PDF form.


Sun has posted an early access release of JavaMail 1.4.1. JavaMail is a basic library for performing POP, SMTP, and IMAP. I wrote about this in the final chapter of Java Network Programming. 1.4.1 fixes bugs. Java 1.4 or later is required. This is published unbder the opesource but GPL-incompatible CDDL license 1.0.


Sun has posted the proposed final draft of JSR-221 JDBC 4.0 to the Java Community Process (JCP). New features in 4.0 include: