This week in Spring: June 21st, 2011

Welcome back to yet another This Week in Spring. SpringSource is out in full force at JAX San Jose this week and we will be at OSCON, in July. These events are great avenues for us to connect with the userbase. As usual, we’ve got a nice complement of stuff to cover this week, so let’s get to it!

  1. There has been loads of interest and discussion surrounding last week's Spring 3.1 second milestone. Sam Brannen writes about the new testing support which is a great follow on to the previous posts about configuration enhancements and Spring MVC updates.
  2. Alex (from the blog "javaaddicto") has also written about the new features in Spring 3.1, and particularly the new support in Spring 3.1 M2 for XML-free web applications in Spring MVC. This is very cool! Check it out.
  3. Here is another more code centric look at XML-free configuration in Spring 3.1 M2, this time on dZone.
  4. Rod Johnson sounds off on the state of the complexity in enterprise Java today. Check out this interview with Rod on the Very cool!
  5. Hot on the heels of the vFabric 5 release, Chris Harris has written up a good look at how to use the new SQLFire to build a Grails CRUD application.
  6. Manning has just released the third edition of SpringSource's very own Craig Walls' Spring in Action. Good stuff, check it out!
  7. Spring Data JPA (formerly, "Hades"), RC1 has just been released! It features, among other things, improved repository interface programming model (transactions at implementation, no need to extend JpaRepository anymore), improved parameter binding for created queries, performance improvement in inspecting annotations, improved detection of domain class from method return types, and much more. Check out the release announcement.
  8. Want to learn about the Tomcat 7 classloader? Get the skinny in this post!
  9. Using the Vaadin web framework? Want to see how to rapidly build a Vaadin application on CloudFoundry? Who wouldn't? Check out this doc that explains how to setup the toolchain (including SpringSource Tool Suite) and build a web application from code, all the way to the cloud.
  10. The AMIS blog has an interesting post on how to access and leverage Spring beans from Oracle ADF Faces-based JSF applications. The blog is a bit out of date - in that it covers Spring 2.5, but could prove useful to users of that framework and technology. Note that - while this approach outlines a tooling-centric approach to adding the libraries and so on, the crux of the Spring / JSF integration is bundled with the core Spring framework as an expression resolver delegate, org.springframework.web.jsf.el.SpringBeanFacesELResolver, which the article does introduce. Very cool, generally, and the setup in Spring 3.x is not generally different, to this is useful for users of newer (and older!) versions.
Read more

Spring 3.1 M2: Testing with @Configuration Classes and Profiles

As Jürgen Höller mentioned in his post announcing the release of Spring 3.1 M2, the Spring TestContext Framework(*) has been overhauled to provide first-class testing support for @Configuration classes and environment profiles.

In this post I’ll first walk you through some examples that demonstrate these new testing features. I’ll then cover some of the new extension points in the TestContext framework that make these new features possible.

      Please note: this is a cross post from my company blog

Read more

This week in Spring: June 14th, 2011

Welcome back to another installment of “This Week in Spring,” and what a week it’s been! This last week saw the release of the Spring 3.1 M2 and vFabric 5! Lots of exciting stuff to talk about there, as well as general community news, so let’s get to it!

  1. Today VMware announced the release of VMware vFabric 5, the application platform that defines the future of enterprise Java for cloud and virtualized execution environments. vFabric 5 contains many of the technologies that the Spring community is already familiar with including tc Server, Hyperic, GemFire, and RabbitMQ, but now adds some new technology.
    • Elastic Memory for Java (EM4J): a new capability for tc Server that provides a completely new level of coordination between the application server and the underlying virtual machine. EM4J uses the underlying vSphere virtualization to overcome some of the limitations of the Java's static memory heap.
    • Spring Insight Operations: leverages the same code-level tracing technology from the Spring Insight project but pulls together information from multiple application servers into a single console with roll-up views, drill downs, and historical comparisons ready for production systems.
    • SQLFire: vFabric SQLFire leverages the time-tested vFabric GemFire underpinnings providing data at memory speed and horizontal scale but vFabric SQLFire adds familiar and standard SQL and JDBC interfaces to the service.

    Rod Johnson discusses all the details of the release in his latest blog. Be sure to check out the latest release and try it out.

  2. Spring core lead Juergen Hoeller has announced that Spring 3.1.0 M2 has been released! At long last, the next step on the steady march to Spring 3.1 GA! The new release is as feature-packed as the last one, with a long list of major new features including (but definitely not limited to!) improved Java configuration support, XML-free and hassle-free Servlet 3.0-based Spring MVC application bootstrapping, new Builder APIs for JPA and Hibernate, and much, much more! Check out the release announcement here and get the bits from your build dependency management tool of choice or the download page
  3. Hot on the heels of the Spring 3.1 release announcement, Chris Beams chimes in on the much-improved Java-centric configuration model in Spring 3.1, M2, even as compared to M1! The features are really starting to come together to make this one of the smoothest, well arranged releases, yet!
  4. Spring 3.1 M2 represents a marked improvement in core Spring, as well as Spring MVC! Rossen Stoyanchev chimes in to introduce the numerous (truly, you'll need to read the detailed blog to get an idea - I won't even bother trying to enumerate them all here!) new features in Spring MVC 3.1 M2, including XML-free web applications on Servlet 3.0 containers. Check it out!
  5. SpringSource Tool Suite 2.7.0.M2 has been released! The new release boasts improved CloudFoundry support and many Grails features, including Grails 1.4 support, Grails-aware Rename Type refactoring, improved content-assist for GSPs, and improved Gradle support. Check it out!
  6. Using Spring Roo? Want to shape it's future? Now's a good time to provide input! The Spring Roo team wants you to fill out a quick survey on the direction of Spring Roo.
  7. Spring Data Document with MongoDB Support, 1.0.0.M3, has been released! From the announcement,
    The changes and new features in Spring Data Document 1.0.0.M3 includes much improved mapping and conversion support. The MappingMongoConverter is now the default converter used by the MongoTemplate and the SimpleMongoConverter has been deprecated and will be removed. The concept of a default collection name has also been removed and all operations of the MongoTemplate are based on the collection name used for the entity class that is the target of the operation. The collection name used for an entity class defaults to the class name starting with a lower-case letter but it can be customized using the @Document annotation.
  8. Spring Data Graph 1.1.0.M1 with Neo4j Support has been released! As the announcement summarizes,
    The Graph Neo4j module provides integration with the Neo4j graph database. Back in 2010, Rod Johnson and Emil Eifrem started brainstorming about Spring and Neo4j integration including transparent persistence and cross-store support. After an initial prototype it has been further developed in close cooperation between the VMware and Neo Technology development teams.
    The new release includes dependency updates, support for the Neo4J query language called Cypher, self-relationships and much more! Check it out!
  9. Using Spring? Want to build Swing applications, or at least, to build Swing applications with some data-driven content and to manage those interactions with Spring? Check out JDAL, a library with utilities geared towards doing just that! According to the website, JDAL is "is built on top of Hibernate ORM and Spring framework and provides you with a set of core database services and UI Components ready to be used via configuration on Spring context configuration files." Very interesting! Some of you will no doubt know about the Spring Rich project, which hasn't been very active of late. It's great to see the community filling in the gaps!
  10. Securing an application using Spring Security and Active Directory is feasible, but the specifics stumped me until just recently when I did some quick Googling and found this post from the SpringSource forums. The solution's spelled out in explicit detail in the response. Convenient!
  11. Looking for a good matrix comparing Spring versus Java EE? One manager, a Bergisch Gladbach, shares his. Very interesting read, and one that reflects the norm for an increasingly large number of users today, I find. Check it out!
  12. A blog, by Loiane Groner, describes how to use custom dates with JAXB. Admittedly, this blog is not very Spring specific, but it's something that you might face when using Spring's JAXB2 Marshaller with a client that doesn't support the same data serialization. One example of this? Spring Android's Simple XML Marshaller doesn't support JAXB2 dates, by default! This is also a good blog to read for the links to the other, more Spring-specific and useful content. If only I'd known this sooner! I can think of at least one code base that will benefit from this recipe...
  13. Blog Java-Kata takes a look at building a multi-row, dynamic form-based web application using Spring MVC, Wicket, and GWT. This first installment introduces the code (which is useful in of itself) and then the Spring MVC iteration. Good stuff, with details for those who've wondered the same thing. Spring MVC is not a component-oriented web framework like Wicket and GWT, so it's nice to see it still fares so well on this complex task.
Read more

Defining the Future for Virtualized and Cloud Java

Today I am proud to announce version 5 of our VMware vFabric™ application platform defining the future of enterprise Java for cloud and virtualized execution environments. vFabric blazes the path to new and modern cloud architectures by providing a modern programming model paired with next-generation platform services. A path that is not overgrown with the cruft and complexity of prior-generation technologies. With vFabric 5, VMware is ensuring that enterprise Java is ready to meet the challenges of tomorrow’s demanding, data-intensive, massively scalable applications.

Read more

Spring Data Graph 1.1.0.M1 with Neo4j support Released

Dear Spring Community,

We are pleased to announce that a new milestone release (1.1.0.M1) of the Spring Data Graph project with Neo4j support is now available!

The primary goal of the Spring Data project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.

The Graph Neo4j module provides integration with the Neo4j graph database. Back in 2010, Rod Johnson and Emil Eifrem started brainstorming about Spring and Neo4j integration including transparent persistence and cross-store support. After an initial prototype it has been further developed in close cooperation between the VMware and Neo Technology development teams.

Read more

SpringSource Tool Suite 2.7.0.M2 Released

Dear Spring Community,

I’m pleased to announce that we just released the second milestone build for the next release of the SpringSource Tool Suite (STS).

This milestone brings mostly new features for the Cloud Foundry support and Groovy&Grails developers, including:

  • Improved Cloud Foundry support

  • Support for Grails 1.4

  • Grails aware Rename Type Refactoring

  • Improved content assist for GSPs

  • Improved Gradle support

More details can be found in the New and Noteworthy for 2.7.0.M2 document. Detailed installation instructions are also available, please look at the installation from the milestone update sites.

Read more

Spring 3.1 M2: Spring MVC Enhancements

This post focuses on what's new for Spring MVC in Spring 3.1 M2. Here are the topics:

  • Code-based equivalent for the MVC namespace.
  • Customizable @MVC processing.
  • Programming model improvements.

A brief reminder that the features discussed here are in action at the Greenhouse project.

Code-based Configuration For Spring MVC

As Chris pointed out in his blog post last Friday, XML namespaces cut down configuration dramatically but also reduce transparency and sometimes flexibility. This holds true for the MVC namespace, which supports a number of customizations but not everything that's available. That means you are either able to use it or otherwise leave it. We believe code-based configuration has a solution for that and a path from simple to advanced.

Read more

Spring 3.1 M2: Configuration Enhancements

As Juergen mentioned in his post yesterday, and as I’ve mentioned in my previous posts on 3.1 M1, one of the major themes of Spring 3.1 is completing our vision for code-based configuration in Spring. We think a modern enterprise Java application should have a choice between Java and XML as first class options for its configuration. In this post we’ll see how Spring 3.1 M2 helps make this a reality.

Note that although Java-based configuration has been available since Spring 3.0, with this release it is now on par with many more of the XML-based features that have been developed over the years. We think the result is very appealing, and in some cases even offering clear advantages over XML-based configuration. In short: if you didn’t consider it in 3.0 you really should look at it closely this time around.

Read more

Spring Framework 3.1 M2 released

Spring Framework 3.1 M2 has been released this week, marking the end of the 3.1 milestone phase. We are moving on to the release candidate phase now, preparing for a feature-complete RC1 in July and a GA release in September.

3.1 M2 completes the work on several major themes started in 3.1 M1 back in February:

  • We’ve stabilized our environment abstraction and the environment profile mechanism. If you haven’t given it a try already, now is a great time to check it out!

  • Our Java-based application configuration approach has changed from the @Feature approach in M1 to @Enable* annotations on regular @Configuration classes in M2.

  • The cache abstraction has been revised for delivering a minimal cache interaction SPI. Our declarative caching solution (@Cacheable etc) keeps sitting on top of it.

Read more

Spring 3.1.0 M2 Released

The second and final milestone of Spring 3.1 is now available from our Maven repository or for direct download from our community download page. This release includes new features such as:

  • Code equivalents for Spring’s XML namespaces

  • Builder-style APIs for code-based Hibernate configuration

  • TestContext framework support for @Configuration classes and bean definition profiles

  • Support for injection against non-standard JavaBeans setters

  • Support for Servlet 3 code-based configuration of Servlet container

  • Support for Servlet 3 MultipartResolver

  • JPA EntityManagerFactory bootstrapping without persistence.xml

  • New HandlerMethod-based Support Classes For Annotated Controller Processing

  • Consumes and Produces @RequestMapping Conditions

  • Working With URI Template Variables In Controller Methods

  • Validation For @RequestBody Method Arguments

Read more