BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News First Spring 2.0 Release Candidate is Out

First Spring 2.0 Release Candidate is Out

The much awaited first release candidate for Spring 2.0 has been released, after five milestones over the last six months. The final release is scheduled for early July, and the Spring team is looking for broad user feedback  until then.  Spring technical lead Juergen Hoeller posted a definitive quick list of the major new features:
Configuration Simplification
  • Bean definitions based on XML schema, with out-of-the-box XML namespaces for simplifying common configuration tasks
  • Support for extended bean scopes in application contexts, with web request and session scopes as main targets
  • Bean definition enhancements: lazy loading of bean classes, collection merging, and intelligent error messages
AOP
  • Simplified AOP configuration based on XML schema namespaces
  • Support for AspectJ pointcut expression language and @AspectJ-style aspects
  • Support for dependency injection on any object, including fine grained domain objects (based on AspectJ)
Persistence and JPA
  • Enhanced JDBC support: named SQL parameters, generics-based SimpleJdbcTemplate
  • Explicit support for Hibernate 3.1 and 3.2 (while remaining compatible with Hibernate 3.0)
  • Support for the Java Persistence API (JPA), including the full container contract with class instrumentation
Scheduling and Messaging
  • TaskExecutor abstraction for submitting asynchronous work
  • Support for various thread pools, such as a Java 5 ThreadPoolExecutor and a CommonJ WorkManager
  • Support for asynchronous JMS ("Message-Driven POJOs") based on message listener containers
Web Application Development
  • Conventions-based web MVC: controller mappings, model attribute names
  • JSP form tag library for use with Spring Web MVC and Spring Web Flow
  • Full support for Portlet environments, including Portlet-style MVC based on a DispatcherPortlet
The documentation has also been significantly improved.

As reported by InfoQ in the must read Spring+JPA to be the next popular stack?, Spring 2.0 now provides the complete EJB container contract for JPA, allowing JPA to be used under a Spring managed services layer (with all the AOP and DI richness of Spring) in any environment.   Debates are already beginning about whether the next defacto stack will be EJB, Spring+Hibernate, or Spring + JPA.  By implementing the ejb container contract, Spring allows the injection of the persistence across components in the same transaction, as well as the ability to have components join transactions and also support for extended persistence context.   Spring 2 thus allows the use of JPA with all the features supported within a container. 

The new PetClinic sample application is available in the Spring 2.0 distribution under /docs/samples showing running over TopLink essentials (the JPA reference implementation).  According to Rod Johnson, the PetClinic was partially authored by Mike Keith, EJB co-spec lead and TopLink Essentials lead at Oracle.   Rod also mentioned that Interface21 will likely be applying to join future versions of the JPA spec.

Solomon Dusksis has also  recently blogged about Spring 2.0 support for scripting languages.

See also:  Pitchfork: EJB 3 Interception & Injection to WebLogic using Spring, and other InfoQ content about Spring, including the free downloadable book Java Transaction Design Strategies which illustrates transaction management in EJB and Spring.

Rate this Article

Adoption
Style

BT