Welcome to another edition of "This Week in Spring" There's a lot to get to, so we'll get to it. A quick note: if you're at VMworld 2011 in sunny Las Vegas, come on over to the Cloud Application Platform booth and say hi.
- What a week for CloudFoundry! The week saw the release and availability of Micro Cloud Foundry, the freely downloadable "PaaS-on-a-stick." Micro Cloud Foundry is a complete, local version of the popular, open source Platform as a Service that lets developers run a full featured cloud on their Mac or PC. Using Micro Cloud Foundry developers can build end-to-end cloud applications locally, without the hassles of configuring middleware while preserving the choice of where to deploy and the ability to scale their applications without changing a line of code. To learn more about the Micro Cloud Foundry, check out these three blog posts introducing Micro Cloud Foundry to Spring developers and Grails developers, and introducing the support for Micro CloudFoundry in SpringSource Tool Suite.
- Thomas Risberg blogged today about using PostgreSQL on Cloud Foundry. The recently announced PostgreSQL support makes CloudFoundry the natural place to deploy your enterprise applications: between MySQL and PostgreSQL there's very likely few speed or feature that you can't match on CloudFoundry. Try it out today!
- Mark Thomas had an article on Tomcat Expert last week about Tomcat 8 and Java 7, answering the question: will they work together?
- Roy Clarkson, lead of the Spring Android project, recently blogged about the various dependency injection options for Android and how to write cleaner code. Check it out for a look at the modern Android developers toolkit.
- Spring provides many ways to support configuration. Spring 2.5 enhanced the options available with stereotypes, which let you
specify a marker annotation as a way to define an injection site.
This very nice blog post first introduces some of the earlier ways to make maximum use of the type system with
@Autowired, then introduces the stereotype model, cleanly and consistently. I wholly recommend it for a great look at an easy way to achieve cleaner code.
- In addition to the MicroCloud, last week saw the announcement of the availability of PHP and Python support through community CloudFoundry providers. This is an ideal situation for developers on those platforms and if you've always wanted first-class support for Python and PHP on a cloud, this release is for you! And, of course, if you're a Python developer, you should no doubt be looking at Spring Python, the Pythonic port of the Spring framework.
- Last week, Alan Stewart, lead of the Spring Roo project, announced the availability of the O'REILLY book, Getting Started with Spring Roo, that my co-author Steve Mayzak and I put together. O'REILLY worked closely with us to help make the book concise, and useful. O'REILLY have graciously agreed to make the book available for free download here, as a
- Virgo 3.0 and Gemini Web 2.0 have been released. The theme of Virgo 3.0 is better integration with EclipseRT technologies. To that end, we have created a Jetty variant of the Virgo web server and have switched from Felix to Equinox implementations of some OSGi services. Gemini Web and the Tomcat variant of the Virgo web server have been upgraded to Tomcat 7 and Servlet 3.0.
Spring AMQP 1.0 GA has been released!
I don't know about you guys, but I've been waiting for this one for a looong time. RabbitMQ is one of the most powerful messaging options available to enterprise Java developers today in traditional Spring applications as well as in the cloud.
Spring AMQP provides the idiomatic Spring support for RabbitMQ, including support for a
PlatformTransactionManagerabstraction, and a message listener container abstraction similar to the support available for JMS. The GA release of the Spring AMQP integration clears the way for the inclusion of the Spring Integration AMQP support in the imminent Spring Integration 2.1. Powerful stuff! Developers looking to get started with messaging in Spring might take a look at this GreenBeans post ("Getting Started with Enterprise Messaging with Spring"), which may be a bit out of date but provides a clear, concise introduction to the relevant concepts and options for both AMQP and JMS integration with Spring.
- Spring GemFire 1.1.0.M2 has been released! This new release includes dedicated support for continuous query (Message Driven POJOs for GemFire), extensive client cache support, and namespace support for region expiration. Very cool release, and users are highly encouraged to check it out. The continuous query support underlies the new Spring Integration Gemfire adapter that's expected to be in Spring Integration 2.1, as well: very powerful stuff!
- Spring Social 1.0.0.RC3 has just been released.
This release includes fixes for bugs reported since 1.0.0.RC2 and tweaks to the API:
ConnectInterceptorimplementations can now add parameters to the authorization URL, Twitter
TimelineOperations.updateStatus()can now post a photo, along with the status, returns a Tweet object, and can also be used to post a reply to an existing status. The set of sample applications has been updated, including two new examples: One to demonstrate a popup-based connection flow and another to demonstrate using Spring Social within a Facebook Canvas application.
- Adobe Technical Evangelist Christophe Coenraets has updated the Flex / Spring Mobile Test Drive. The new code is available on GitHub.com.
- This post, by Artur Mkrtchyan, does a nice job providing an introduction to writing a MongoDB client using regular Java and then taking it a step further and using the Spring Data project to talk to MongoDB. Good stuff, Artur!
Job scheduling support in Spring's always been pretty robust, historically supporting Quartz, and - from Spring 3.0 and later - supporting
@Scheduledannotation. However, there is always room for improvement, and this blog explores this, even linking to code that would allow you to build on core Spring, and get
@Scheduled-like ease-of-use while delegating to Quartz's power. Even if you're not interested in job scheduling, this post serves as a fine example of how anybody can build on the rich lifecycle hooks and component model to extend Spring's API for your own application using the same hooks as the framework itself uses. Good stuff!
- This post on community.jboss.org about using Spring Web Services with JAXB is both concise and useful. It introduces the data modeling approach for contract-first web services using Spring Web Services and JAXB, the Java API for XML binding.
A blogger, Roger Hughes, has written up a string of blogs recently that are really insightful!
The first post introduces Spring 3's
@NumberFormat. The second introduces Spring 3's
@DateTimeFormatannotation. The third post introduces Spring MVC's
Conventionsclass, which is at the heart of some of the major convention-over-configuration centric changes seen in recent Spring MVC releases that let you, for example, add any object to the
Modelthat is made available to the view and omit the name used to store that model attribute, deferring to the
Conventionsclass to provide a sane name based on the JavaBeans specification. In this latest post, he cautions that while using the conventions in some cases can be very helpful (such as with
<mvc:annotation-driven/>), using some defaults can cause confusion. This is a fair point, and it's nice to have the choice, either way. Nice work, Roger!
- This blog post highlights the fact that Spring.NET supports bi-direction injection, a feature that distinguishes it from Ninject and MS Unity.
- Want to run multiple Tomcat instances on one machine? This blog post explains the nitty gritty details. Good stuff.