This week in Spring: March 22nd, 2011

Engineering | Josh Long | March 23, 2011 | ...

Another great week - lots of new (and novel!) types of content and indeed, new sources of new content, too! Enjoy!

  1. SpringSource unveiled the new SpringSource YouTube channel. This channel features exciting technical content on the SpringSource technologies, and should be your first destination for new content and for content that you might've missed the first time around. Check it out today! Personally, I find that this channel is fantastic on a big screen TV that supports a browser or YouTube (Google TV/Apple TV/slingbox/etc.) or on a peripheral screen - like a second laptop or second monitor. You can also listen to it on a portable device like an iPhone in the car, on the commute.
  2. ...Speaking of the YouTube channel, the content and slides of last week's webinar - Getting Started with Spring and STS - is available for those that missed it. Juergen Hoeller, lead of the Spring framework, introduced the exciting next generation (3.1) of the Spring framework a few weeks ago in a live webinar, which is also available on the SpringSource YouTube channel!
  3. Martin Lippert has announced the latest release of the SpringSource Tool Suite, version 2.6.0. The new release is packed with new features, and tracks the latest versions of various projects (Spring Roo 1.1..2, Eclipse Helios SR2, Groovy 1.7.8, Grails 1.3.7). It included updated support and performance for both Spring Roo and Groovy on Grails, a graphical editor for Spring Web Flow, and new support for content assist, quick fixes and refactorings for Spring annotations (@Autowired, @Qualifier, @RequestMapping, etc.).
  4. Ramnivas Laddad pointed This Week in Spring to this very innovative Chrome browser plugin. To use it, type "spring" in the omnibox bar (the search/address bar) followed by a space, and then the nane of the class that you are searching for. It'll automatically bring up candidate results linked to the documentation! Fantastic, and handy! (NB: we tested this with the just-released Chrome 10, though it no doubt works with at least Chrome 9.)

  5. InfoQ has the video of Mark Pollack's and Chris Richardson's amazing introduction to Spring Data from the SpringOne2GX event last year in Chicago. Spring Data is a great way to take advantage of these new, powerful datastore options (sometimes called "NoSQL" stores) in a way that's familiar, and idiomatic for Spring users. Check it out!
  6. The latest release of the Spring Data project featuring support for Neo4j has been released. The new version includes many new features and tracks the latest version of Neo4j, itself. Neo4j is one of the many new specialized datastores available to developers today. Neo4j models data as relationships and nodes. It's optimized for fast node traversal, as in a Facebook friend-graph, for example.
    Additionally, SpringSource is producing a webinar on Spring Data (and specifically, the Spring Data Graph subprojct encompassing the Neo4j support) on April 20th. The presentation will be presented for both North America and for Europe. Register now!
  7. The Spring framework helps you build the best applications. Spring Social builds on that promise and lets you integrate your application with your users. The JTeam group is at it again, this time with an interesting updated look at Spring Social complete with source code and a sample application. Check it out!
  8. Spring MVC provides support for many different types of views, including RESTful payloads, Velocity templates, JSPs, and Tiles-based views. This blog post explains how to integrate Spring MVC with Tiles
  9. Ken Rimple from Chariot Solutions has recorded a screencast on the newest member of the SpringSource family, Wavemaker.
  10. More people are using the Spring framework now than ever before, and a consequence of that that growth is newer, specialized support for Spring in various tools. One UML toolmaker - Architexa - talks about their enhanced support for the Spring framework in their Eclipse-based product. Check out this blog for more.
  11. Ashish Jain provides an interesting perspective on Spring 3.1's new caching support.

    Ashish's chosen to simplify his software stack (by removing Hibernate, and instead using straight JDBC through the Spring framework's JdbcTemplate, a…

This week in Spring: March 15th, 2011

Engineering | Adam Fitzgerald | March 16, 2011 | ...

Another great week for good, deep content. Most of the items on the list this week are best enjoyed with a nice cup of coffee and a nice, comfy chair. :-) Enjoy!

  1. SpringSource will be presenting a free webinar - Getting Started with Spring and SpringSource Tool Suite - this Thursday. The presentation will give experienced folks a look at some of the new methodologies, and will give newcomers to the technology a chance to get started with it and move quickly into productive application development. Additionally, attendees will have a chance to ask questions of the presenter and panelists. The webinar will be presented twice, once for Europe, and once for North America. I hope to see you there!
  2. Spring MVC lead Keith Donald's video introducing Spring MVC 3 from SpringOne2GX is up on Great video with lots of information in just 90 short minutes. Check it out!
  3. Craig Walls posts this week on Extending Spring Social's Service Provider Framework, this time introducing an example integration with the Netflix API. Very informative post, and inspiring - I couldn't help but have exciting ideas for applications pop into my head when I was reading it.
  4. This VMware whitepaper provides a pretty good look at the migrating from a Java EE application server to the leaner, more powerful SpringSource tcServer. It makes for some fascinating reading - and highlights some very interesting information. Check it out!
  5. 	<li>The whitepaper exploring a migration from a Java EE application to tcServer has a companion <a href="">in this VMware</a> whitepaper,  that talks about the migration from Tomcat to tcServer. Pretty exciting!
  6. This blog post introduces high thoroughput, asynchronous Servlet 3.0 applications. The post is useful for people using Tomcat or tcServer, particularly, because they represent the largest Servlet 3.0-compatible install base, by far.

Extending Spring Social's Service Provider Framework

Engineering | Craig Walls | March 10, 2011 | ...

Last week, I introduced you to Spring Social's Service Provider "Connect" Framework and showed you how it simplifies creating connections between a user's local application account and their accounts on Software-as-a-Service (SaaS) providers. Today I want to show you how to extend the service provider framework to handle connections to providers that aren't directly supported by Spring Social.

Extending Spring Social for Netflix

Suppose that you're developing a movie review website where users can go to read and post short movie reviews. Normally, the movie reviews are displayed with the most recent entries appearing first on the home page. But if a user has connected their account to their Netflix account, then you can show them reviews for the movies in their Netflix disc queue. To pull this off, you'd like to take advantage of Spring Social's Service Provider Framework for connecting your user's accounts with their Netflix accounts. Spring Social 1.0.0.M2 doesn't include a Netflix service provider or API binding, but can be easily extended to work with providers that aren't directly supported.

In this article, I'll show you how to build on Spring Social's Service Provider Framework to enable connectivity with Netflix. We'll start by developing a Netflix service provider implementation, then build a simple API binding to support our application's needs. The techniques used to develop the Netflix service provider can be applied to extend Spring Social to support almost any service provider. You can follow along by reviewing the sample code on GitHub.

Getting to Know Netflix' Authorization API

Before we can start developing the Netflix service provider implementation, we need to do a bit of up-front research to get to know a few basic details about how the Netflix Authorization API works.

The first thing we need to determine is what authorization protocol Netflix uses. The Authentication Overview section of the Netflix API documentation tells us that they use OAuth, but doesn't explicitly tell us which version of the OAuth specification is in play. Therefore a bit of detective work will be required.

Down the page a bit (under the "Those Pesky OAuth Parameters" header) we see mention of consumer keys, nonces, and timestamps. These are things that are not applicable to OAuth 2, so Netflix must be an OAuth 1 provider. Furthermore, the description of the oauth_version parameter being set to "1.0" serves to confirm that Netflix implements OAuth 1.

Now we know that Netflix uses OAuth 1. But it's also important to know whether they implement version 1.0 of the specification or version 1.0a. Service providers usually don't spell this out in their documentation and the oauth_version value should be "1.0" in either case. There are a few tell-tale signs, however, that point at a particular version of the OAuth specification. Here are a few clues that indicate that OAuth 1.0 is in play:

  • The oauth_callback parameter is sent on the authorization URL and not the request token request.
  • There is no notion of verifiers and no oauth_verifier parameter must be sent to the access token URL.

For OAuth 1.0a, watch for these signs:

  • The oauth_callback parameter is sent in the request token request and not in the authorization URL.
  • A verifier is received from the provider in the callback and an oauth_verifier parameter must be sent to the access token URL.

Looking for these clues in the Netflix documentation, we determine that Netflix uses OAuth 1.0 (not 1.0a). This information is significant and will be useful as we define our service provider implementation.

Finally, we need to know what the request token, authorization, and access token URLs are. Further down the page (under the "Making Protected Calls" header) you'll find details that tell us that the needed URLs are as follows:

  • Request Token URL:
  • Authorization URL:
  • Access Token URL:

Pay particular attention to the protocols used in the request and access token URLs. Most providers are flexible in this regard, recommending that you use https. In my experience with Netflix, however, I've found that if you ask for a request or access token over https, Netflix will complain that the request signature is invalid. The authorization URL works fine over https, though.

Developing a Netflix Service Provider Implementation

To create a new service provider implementation, we'll need to extend either AbstractOAuth1ServiceProvider or AbstractOAuth2ServiceProvider. These two classes provide OAuth version-specific base functionality for OAuth 1.0/1.0a and OAuth 2, respectively. Since Netflix is an OAuth 1.0 provider, our NetFlixServiceProvider will need to extend AbstractOAuth1ServiceProvider:


public final class NetFlixServiceProvider extends AbstractOAuth1ServiceProvider<NetFlixApi> {

    public NetFlixServiceProvider(String consumerKey, String consumerSecret, ConnectionRepository connectionRepository) {
        super("netflix", connectionRepository, consumerKey, consumerSecret, 
            new OAuth…

This week in Spring: March 8th, 2011

Engineering | Josh Long | March 08, 2011 | ...

This week has seen yet another flurry of exciting new releases and updates, great community content and the exciting announcement welcoming WaveMaker to the SpringSource family.

  1. Rod Johnson announced the acquisition of WaveMaker today in the SpringSource blog. WaveMaker is a widely used graphical tool that enables non-expert developers to build web applications quickly. From the post: "While WaveMaker is already part of the Spring ecosystem, it will now become an integral part of the Spring family and VMware's cloud strategy. All of WaveMaker's staff will be joining VMware." Exciting…

Addressing a Big New Audience: VMware Acquires WaveMaker

Engineering | Rod Johnson | March 08, 2011 | ...

Today, VMware announces with this blog the acquisition of WaveMaker, a widely used graphical tool that enables non-expert developers to build web applications quickly.  While WaveMaker is already part of the Spring ecosystem, it will now become an integral part of the Spring family and VMware’s cloud strategy. All of WaveMaker’s staff will be joining VMware.

This acquisition furthers VMware’s cloud application platform strategy by empowering additional developers to build and run modern applications that share information with underlying infrastructure to maximize performance, quality of…

Introducing Spring Social's Service Provider Framework

Engineering | Craig Walls | March 02, 2011 | ...

In my previous post, I introduced you to Spring Social's Java bindings to popular Software-as-a-Service (SaaS) APIs such as Twitter, Facebook, LinkedIn, and TripIt. In addition to providing simple, strongly-typed Java methods for common API operations, these bindings ensure each HTTP request includes the credentials required to authorize your application to invoke the API on behalf of a user.

What my first post did not address was: how do we manage the credentials required to invoke service APIs on behalf of users? I'm pleased to say that we now have answers to that question.

Earlier this week, we announced the release of the second milestone of the Spring Social project. The most significant new feature in Spring Social 1.0.0.M2 is the introduction of a Service Provider "Connect" framework. Today I want to introduce you to this framework and show you how to use it to manage "connections" to SaaS providers.

The examples in this article are from the Spring Social Showcase. To follow along, clone the repository and follow the README to build and deploy the sample app.

Getting Spring Social

With the M2 release, Spring Social has been split into several modules:

  • spring-social-core - The service provider framework, OAuth support, and core classes.
  • spring-social-web - The connect controller and supporting types.
  • spring-social-facebook - A service provider implementation for connecting with Facebook and support for signing into an application via Facebook.
  • spring-social-twitter - A service provider implementation for connecting with Twitter and support for signing into an application via Twitter.
  • spring-social-linkedin - A service provider implementation for connecting with LinkedIn.
  • spring-social-tripit - A service provider implementation for connecting with TripIt.
  • spring-social-github - A service provider implementation for connecting with GitHub.
  • spring-social-gowalla - A service provider implementation for connecting with Gowalla.
  • spring-social-test - Support for testing service provider implementations and API bindings.

Depending on your needs, you won't necessarily need all of these modules. At a minimum, you'll need the core module. You can add this to a Maven-built project with the following entry:


In the likely case that you'll be using Spring Social in a web application, you'll also need the web module:


Then, you'll need to add one or more of the provider modules. In our examples, we'll be talking about adding Twitter connectivity to an application, so we'll need the twitter module:


Since we're building off of a milestone release of Spring Social, we're going to need to add Spring's milestone repository to the pom.xml file:

	<name>Spring Maven Milestone Repository</name…

This week in Spring: March 1st, 2011

Engineering | Josh Long | March 02, 2011 | ...

This week has seen yet another flurry of exciting new releases and updates and great community content.

Hold on to your hats!

Let's get right to it.

  1. Spring Roo 1.1.2 has been released. This new release contains over 200 enhancements, new features and fixes since the 1.1.1 release last month. Some of the highlights include enhanced tool usability, persistence enhancements, GWT and Spring MVC enhancements, and library upgrades.
  2. Martin Lippet has just announced the 2.5.2.SR1 and 2.6.0.M2 releases of SpringSource Tool Suite.

    The 2.5.2.SR1 "refresh" has updated support for Groovy 1.7.8, Grails 1.3.7, an update to Eclipse Helios SR2 (3.2.6), and the just-released Spring Roo 1.1.2. The 2.6.0.M2 mileston also includes a Roo plugin manager, improved support for @RequestMapping, and tons of improvements to the Groovy and Grails tooling.

  3. Martin Lippet has also put together information on the oft-asked and newly answered question: how do

    I contribute custom Project…

Custom Project Templates in SpringSource Tool Suite

Engineering | Martin Lippert | February 24, 2011 | ...

The SpringSource Tool Suite (STS) provides the New Spring Template Project wizard. Uses this wizard, the user can see a number of project templates, choose one and let the wizard create a complete project, based on that template description. While this gives you an easy way to create new projects, you might wanna define your own custom project templates for your team or your organization. And we will show you how to do this in the following.

1. Step: Contribute a new resources extension to STS

STS creates the list of available project templates by downloading and reading resource XML files. To let STS know where those resource files are located, you need to contribute them to STS via an extension.

So the first step is to create a new and empty plugin project. You don't need Java code in there, so don't create this as a Java project. Just create a…

Green Beans: Getting Started with Spring Integration

Engineering | Josh Long | February 24, 2011 | ...

Applications don't exist in a vacuum. They need to communicate with their customers and with other applications. Application Integration is all about enabling this communication. Integration lets applications share services and data with each other, and, just as often, integration helps applications connect with their users.

Spring Integration provides a framework to build integration solutions, to facilitate these kinds of solutions. Spring Integration solutions describe the flow of data through a pipeline. Data enters the processing pipeline as a message. The message is moved forward through…

Spring 3.1 M1: Cache Abstraction

Engineering | Costin Leau | February 23, 2011 | ...

One of the major features added in Spring Framework 3.1 M1 is the generic cache abstraction for transparently applying caching to Spring applications. Just like the transaction support, the caching abstraction allows consistent use of various caching solutions with minimal impact on the code.


Caches are in general used to improve application performance by transparently serving frequently accessed data in a faster fashion such as serving data from local memory rather than from the network. Many of you have already used caching, whether knowingly or not: most ORM/JPA frameworks provide…

Get the Spring newsletter

Thank you!

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all