SpringOne 2009: Spring Framework 3.0

SpringDisclaimer: This entry has been written while listening to the talk and writing package documentation for a QuinScape project. Please forgive me any typographical or grammatical errors resulting from this approach.

Jürgen Höller is going to provide an overview about the most important changes that are going to be expected in Spring Framework 3.0. Jürgen intends to focus on the core framework.

I will focus on the news to be contained based on the current state of 3.0 development, which Jürgen started to give after a short overview of Spring 2.5:

  • JDK 1.5 is required at runtime. Specifically this means that generics are being used in a lot of places. Additionally Springs TaskExecutur now extends java.util.concurrent.Executur, standard callables and futures.
  • The Java 5 annotation-based component model is being used throughout.
  • The Spring expression language is added to Spring configurations – everywhere. Jürgen calls it a “Unified EL++” because SpringSource provides their own EL parser that is fully compliant with standard EL but expands on those concepts in order to allow for more powerful expressions. Expressions can be used in bean definition values both for value and annotation based definitions. These expressions are resolved lazily (e.g. once per request or instantiation differentiating from mere placeholders and allowing them to reference to the most uptodate context). Enhancements include method calling, object creation and simple arithmetics. There are also some implicit attributes like e.g. systemProperties, systemEnvironment and all beans contained in the Spring context.
  • First class comprehensive REST support is included. There will also be client-side rest support. A JAX-RS based provider based on Jersey will also be included.
  • REST content negotiation for JSON, XML and ATOM will be included.
  • Declarative model validation (as per Hibernate Validator and JSR 303) is being added.
  • There will be early support for Java EE 6. At this time JSF 2.0 and JPA 2.0 are being supported as well as the JSR 303 validation.
  • All the framework modules have been revised, there now is one source tree per module. spring.jar will no longer will be available.
  • Ivy is being used throughout the system.
  • Application event listening now is a lot more elaborate by using generics to detect the specific event type requested.
  • Spring 3.0 includes the Object/XML Mapping (OXM) module implemented by Spring Web Services to generify XML mappings.
  • Similarly a new binding and type conversion API and SPI is being implemented, strongly inspired by Spring Webflow binding.
  • Spring JavaConfig is integrated into the core. Spring JavaConfig thus finally will be leaving its milestone character behind. There are many extensions like modes of operation, annotated factory methods and more.
  • Annotations have been enhanced by allowing to combine meta-annotations with e.g. stereotypes. This time the annotations are automatically detected and don’t require additional information. Additionally a meta level has been added in that your own annotations can be annotated with standard stereotypes and the container will also handle them appropriately. Additional transactional annotations are allowed for your own annotations. That’s just an example, it works both on the type level and the method level.
  • Portlet 2.0 suppport has been added. There are additional resource and event requests that are supported. Spring 3.0 MVC’s annotation support includes specific annotations for that.
  • One of the most interesting features (I so far only read a short blog notice about) is the problem of serialization failures resulting from referenced non-serializable objects. The planned solution is to not directly inject the non-serializable object but rather a serializable scoped proxy that upon deserialization once more locates the appropriate bean from the then current Spring application context.
  • The scheduling package will be overhauled in a major way. Preparation for JSR-236 will be included. There will be more cron-like support.
  • It will be fully OSGi compatible out of the box.
  • Requirements for Spring 3 are Java 5 and above, Servlet 2.4 and above as well as Java EE 1.4 and above.

The following functionalities will be removed:

  • Commons Attributes
  • Toplink API
  • subclass style Struts 1.x support

Deprecations include:

  • the traditional MVC controller hierarchy
  • traditional JUnit 3.8 class hierarchy
  • several outdated helper classes

For Spring 3.x scheduled for 2010 there will be full support for Java EE 6, Servlets 3.0 and JSR-236 to full extent.

Finally Jürgen noted that Spring is also compatible with the Google App Engine (and other special hosting environments). A few specific functionalities need to be adapted, Spring 3 will take care of these final details.

Spring 3.0 M3 will be the last milestone before RC1 and will be released any day now. RC1 is scheduled for May 2009, 3.1 is expected for Q4 2009.

Personally I was somewhat disappointed with this talk because it was almost the same that I already had heard at last years Spring developer day and W-JAX’ Spring Day with only minor additions. I don’t like being bored by rehashed news – although Jürgen is really interesting to listen to and I consider his talks to be essential when I’m visiting Spring-related events. Nonetheless I would have expected some more new stuff considering the time that passed since the last talk I heard about this in 2008. Some of the more SpringSource blog entries contained almost all the information. Maybe a better warning about the content would have been appropriate.

Comments are closed.