This week in Spring: August 30th, 2011

Engineering | Josh Long | August 31, 2011 | ...

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.

  1. 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.

    	<LI>Thomas Risberg blogged today about <A HREF="">using PostgreSQL on Cloud Foundry</a>. 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. <a href="">Try it out today!</a>  
    	 </LI><LI> Mark Thomas had an article on <a href="">Tomcat Expert</a> last week about  <A href="">Tomcat 8 and Java 7</a>, answering the  question: <EM>will they work together</EM>? 
    	 <LI>Roy Clarkson, lead of the Spring Android project, <a href="">recently blogged about the various dependency injection options for Android</A> and how to write cleaner code. Check it out for a look at the modern Android developers toolkit. 
    	<LI> Spring provides many ways to support configuration. Spring 2.5 enhanced the options available with <EM>stereotypes</EM>, which let you 
    			specify a marker annotation as a way to define an injection site.
    			This <a href="">very nice blog post</a> first introduces some of the earlier ways to make maximum use of the type system with <CODE>@Autowired</CODE>, then introduces the <EM>stereotype</EM> 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 <A HREF="">the announcement</A> of the availability of <a href="">PHP</a> and <a href="">Python</a> 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 <a href="">Spring Python</a>, the <EM>Pythonic</EM>		port of the Spring framework. 
    	<LI> Last week, Alan Stewart, lead of the Spring Roo project, <a href="">announced the availability</a> of the O'REILLY book, <EM>Getting Started with Spring Roo</EM>, 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  <a HREf= "">available for free download here</a>, as a <CODE>.PDF</CODE>. 
    		 Readers who want an alternative e-reader-specific format or want to get a print copy of the book on-demand may of course pursue those options at the <a href="">O'Reilly page for the book</a>. 
    		The book features an introduction to Spring Roo as well as an introduction to two of the many powerful, new addons being developed for Spring Roo: the Spring Data Neo4j addon, and the Vaadin web framework addon. 			 
    			<A href ="">Virgo 3.0 and Gemini Web 2.0</a> 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.			 
    		 <A href="">Spring AMQP 1.0 GA has been released!</A> 
    		 I don't know about you guys, but I've been waiting for this one for a <EM>looong</EM> time. RabbitMQ  is one of the  most powerful messaging options available to enterprise Java developers today in traditional Spring applications <A href="">as well as in the cloud.</a>  
    			 Spring AMQP provides the idiomatic Spring support for RabbitMQ, including support for a <CODE>PlatformTransactionManager</CODE> abstraction, 
    			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 <a href="">this GreenBeans post ("Getting Started with Enterprise Messaging with Spring")</a>, 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. 
    		<LI><A href="">Spring GemFire 1.1.0.M2 has been released!</a>
    			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! </LI>
    <li> <a href="">Spring Social 1.0.0.RC3 has just been released.</A> 
    	This release includes fixes for bugs reported since 1.0.0.RC2 and  tweaks to the API:  <CODE>ConnectInterceptor</CODE> implementations can now add parameters to the authorization URL, 		Twitter <CODE>TimelineOperations.updateStatus()</CODE>  can now post a photo, along with the status, returns a Tweet object, and can also be used to post a <EM>reply</EM> 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.
    	</li>	<LI> 
    	Adobe Technical Evangelist Christophe Coenraets
    	<a href= "">
    	  has updated the Flex / Spring Mobile Test Drive. 
    	The new code is available on <a href=""></a>. 		</li>
    	This <a href="">post, by Artur Mkrtchyan</a>, 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!
  2. Job scheduling support in Spring's always been pretty robust, historically supporting Quartz, and - from Spring 3.0 and later - supporting the @Scheduled annotation. 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!
  3. <LI> <a href ="">
      This post on</A> 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. 		 
  4. 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 @DateTimeFormat annotation. The third post introduces Spring MVC's Conventions class, 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 Model that is made available to the view and omit the name used to store that model attribute, deferring to the Conventions class 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!

  5. This blog post highlights the fact that Spring.NET supports bi-direction injection, a feature that distinguishes it from Ninject and MS Unity.
  6. Want to run multiple Tomcat instances on one machine? This blog post explains the nitty gritty details. Good stuff.

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

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

Learn more

Get support

Tanzu 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