This week in Spring: June 7th, 2011

Engineering | Josh Long | June 07, 2011 | ...

Welcome back to another exciting roundup! This week's been a blur. Honestly. So much new stuff happening, all after the rush of excitement that was the S2G Forums in Europe last week. Leave's a guy breathless, but excited. Read on!

  1. Mark Fisher and Ramnivas Laddad's webinar Spring From Zero to Cloud in 60 Minutes is available online.
    This webinar is a breakneck-speed tour of some of the Spring, Spring Roo and Grails support on CloudFoundry. Check it out!
    Before you start watching, however, quickly signup at CloudFoundry.com to get access to the public, free-beta cloud service. If you want to checkout the code and learn more, check out CloudFoundry.org.

  2. Jeremy Grelle, Spring BlazeDS lead and general "Spring web dude," has announced the first release candidate of the Spring Flex project. The Spring Flex project integrates the Flex BlazeDS middleware with Spring, providing a dead-simple way to expose Spring beans in a way that can be consumed by Flex or Adobe AIR web and desktop clients. The Spring Flex project also provides integration with Spring Security and provides tight-knit support for server-side push based messaging, entirely in-BlazeDS, or through JMS or Spring Integration. Ever wanted to notify users logged into an application that something's happened on the server side (Twitter message, new AMQP message, new XMPP message, whatever..)? Spring Flex makes it easy.
  3. Martin Lippert, SpringSource Tool Suite team lead, has given an interview about the latest and greatest in SpringSource Tool Suite 2.6. He talks about many of the highlights, including STS 2.6's reworked Spring Webflow visualization, Java configuration support, the cloud, agent-based reloading, and what's next. Check it out!
  4. Thomas Risberg has announced the Spring Data Document support for MongoDB, release 1.0.0.M3. 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 classname starting with a lower-case letter but it can be customized using the @Document annotation. See the changelog for more details.
  5. Milestone 5 of Virgo 3.0.0 is available for download. This is an important milestone which adds significant functional enhancements, upgrades several dependencies to their latest levels including Spring 3.0.5, Tomcat 7.0.12, and Servlet 3.0, and fixes a number of bugs. Full details are available in the release notes. The Virgo Web Server from EclipseRT is a completely module-based Java application server that is designed to run enterprise Java applications and Spring-powered applications with a high degree of flexibility and reliability. It offers a simple yet comprehensive platform to develop, deploy, and service enterprise Java applications.
  6. Marius Bogoevici - a Spring Integration committer - has written a fantastic post on the options for using a JPA EntityManager in JBoss AS with Spring. The main thrust of the post is that the application server automatically creates an EntityManager, by default, so there may be no need to recreate one in Spring - you can simply inject the existing reference. This approach is specifically to get around the presumptuous behavior of a full blown application server. If you'd like to run in Tomcat, then Spring's the easiest way to configure a JPA EntityManager. Marius also explains how to let Spring run the show entirely by disabling the application server behavior. This has the plural benefits of usually being more performant, and of keeping configuration with the application itself, not the server.
  7. Matt Raible has posted a follow up to his blog posts and screencasts on security in web applications. Previously, he demonstrated how to use Spring Security, Apache Shiro, and Java EE security in a pseudo identical fashion to secure a web application, highlighting the differences as appropriate. This follow up article talks about all three technologies and provides a comparison for enabling programmatic login when integrated in a Spring MVC application. The Spring Security support has been around for a long time and works in numerous containers (not Just Java EE 6 compliant containers) with no fuss. Nice!
  8. Have you dabbled in other JVM based languages? Have you taken a look at Scala? Well at the recent Scala Days conference in Palo Alto, CA, the Cloud Foundry team announced new Scala support on CloudFoundry.com!
  9. If you were at the S2G Forums in London last week, you would've received a free copy of the Open Source Journal - a printed (and freely downloadable .PDF) magazine. This publication has done a bang up job covering some of the Spring framework technologies. It's available from the publisher's web site as a free download. Check out the first and second issues here. The second issue, for example, has a great introduction to Spring.NET (including the new code configuration - the .NET analog to Spring Java's Java configuration), a look at Spring.NET's RestTemplate (a nice analog to Spring Java's RestTemplate), and a look at using Spring Integration (and Spring Web Services) to make short work of exposing web services. This format is especially ideal if you have a .PDF-capable e-reader or tablet PC. Check it out!

Countdown to Grails 2.0: Unit testing

Engineering | Peter Ledbrook | June 07, 2011 | ...

The first milestone of Grails 1.4 (now 2.0) has now been released and we are on the last stages of the journey towards 1.4 2.0 final. As we approach that point, I will be writing a series of blog posts that cover the various new features and changes that the 1.4 2.0 version brings. I'll be starting with the new testing support.

Since the beginning, Grails has provided three levels of testing support for developers: unit, integration, and functional. Unit tests had and still have the benefit of running independently of Grails, but they typically required a fair bit of extra work in the form of…

A Simple Groovy DSL for building RabbitMQ AMQP Applications

Engineering | Jon Brisbin | June 01, 2011 | ...

Asynchronous applications can sometimes be a challenge while you're developing them since you usually need two separate components to see the full message publication and consumption lifecycle. It often happens that you write a consumer that can dump messages to System.out or your log file, just so you can make sure your publisher is doing the right thing. It would be really handy if you could mock the message publication and consumption interaction in a single component so you could actually see what's going on.

The RabbitMQ Groovy DSL aims to help with this by providing a very concise and…

This week in Spring: May 31st, 2011

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

The excitement continues today at the SpringSource S2G forums here in London! The energy leading up to the event has been staggering, and the talks - on a wide variety of deep, technical topics - are very impressive! I've had several of my questions answered, and learned a lot about some of the new, interesting, upcoming technologies from SpringSource. If you didn't get a chance to attend this year, we will be posting the session slides next week. Also don't forget, there is still SpringOne 2GX later this year (October) in Chicago!

  1. Many people love Spring Batch as soon as they give it a try, and many of those people then start trying to tell others about it precisely because it's so wonderful to know that they won't have to solve the problem themselves. Batch processing's something we all do at some point or another: moving data from database to another, reading from a file system, making web service calls and need to handle retry logic, etc. These use cases (and many more) are natural fits for Spring Batch. If you want to see one very succinct, useful introduction to the technology with an emphasis on code, check out Sanjoy Kumar Roy's blog introducing Spring Batch. Very cool! If you give Spring Batch a try and feel like you have something to add to the discussion, write a blog and ping me to let me know so I can highlight it on this page!.
  2. 	<li>
    		Roy Clarkson notes that starting May 28, 2011, the repositories for <a href="http://www.springsource.org/spring-android">Spring Android</a> and <A HREF ="http://www.springsource.org/spring-mobile">Spring Mobile</a> have moved to GitHub, and are available at the following URLs:
    
    	<div><b>Spring Android:<br/></b>
    		<UL><li><a href="https://github.com/SpringSource/spring-android">Spring Android</a></li>
    		<LI><A href="https://github.com/SpringSource/spring-android-samples">Spring Android Samples</a>
    			</li> </div>
    				<div><b>Spring Mobile:<br/></b>
    					<UL><li><a href="https…

This week in Spring: May 24th, 2011

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

What a week! Excitement is in the air as we near the S2G Forums here in Amsterdam on the 26th and then next week in London on the 31st of May. If you're in Europe, be sure not to miss these exciting, jam-packed days with talks on all manner of topics including Spring, Grails, the cloud, big data and of course tooling.

  1. Mark Fisher and Ramnivas Laddad presented their hit webinar - "From Zero to Cloud in 60 Minutes" - on Cloud Foundry last week. Thank you all for attending and making it a success! If you missed it, you can still get the slides and watch the replay here. Note that there are, as usual, lots of other resources there once you're done with the CloudFoundry webinar. Check out the other developer webinars (scroll down, click on the "Developers" tab), and check out the SpringSource Dev YouTube page.
  2. Juergen Hoeller, the Spring project lead, presented on the next generation of Spring -- Spring 3.1 and beyond, at QCon London earlier this year. His talk and slides are available on InfoQ.com
  3. The video for the Getting Started with Spring Data Graph webinar is available, as well. This webinar introduces the Spring Data Graph project - a joint effort between the Spring and Neo4j engineering teams to bring first-class support for Neo4J to your Spring applications. If you want a more natural way to integrate the NOSQL data technologies in your existing architecture, simply want more speed, or want to see what you're missing, then you should definitely check this webinar out.
  4. In a fantastic example of eating ones own dogfood, Mark Thomas - Tomcat committer and Apache Bug tracking infrastructure maintainer - explains how the Apache JIRA interface was being whelmed - not overwhelmed, but still running inefficiently - by search engines that hit specific JIRAs, but didn't maintain a session cookie, triggering the creation of numerous sessions. Mark describes the creation of a custom Valve for Tomcat 7 (and SpringSource's tcServer) that associates a single Tomcat session with each web crawler, greatly reducing their footprint.
  5. Spring Web Services 2.0.2 has been released. For more information, see the change log. Spring Web Services 1.5.1.0 has also been released. For the changes in this release, please see the changelog. Both releases include some worthy updates in of themselves, but, importantly, both also resolve a potential security issue. It is recommended that users upgrade as soon as possible.
  6. <LI> Google I/O, Google's developer conference, is an exciting time for enterprise Java developers, and of course, this also means Spring developers. One notable announcement was the <a href="http://vaadin.com/springroo">1.0 release of the Spring Roo plugin for Vaadin,</a> which is a widget-centric approach to web application development.  Vaadin's a very innovative way to build web applications today, and - of course - <a href="http://vaadin.com/wiki/-/wiki/Main/Spring%20Integration">it works well with Spring.</a> (NB: those instructions are old, but they should still work, and you can just…

This Week in Spring: May 10th, 2011

Engineering | Adam Fitzgerald | May 11, 2011 | ...

May's well underway and all the preparations for the S2G Forums in Amsterdam and London are complete. These S2G Forums are the premiere place for people in Europe to get access to the best information related to the Spring community (at a minimum cost!). I hope we'll see you in Amsterdam (May 26, 2011 - € 114 ) and / or London (May 31, 2011 - £ 99)!

In the interim, those of you that want an even better picture of how the Spring framework plays on the nascent CloudFoundry open-source cloud PaaS project should be sure to attend a webinar - Spring from Zero to Cloud in 60 minutes for both North America and Europe in just 10 short days!

  1. SpringSource Tool Suite 2.6.1 Released. This release features the usual updates and features. Some particularly notable features: an updated bundled version of vFabric tc Server, version 2.5, improved support for tc Server instance creation and an update to the latest release of Spring Roo, version 1.1.3 and (yay!) bundled support for CloudFoundry. Check out the New and Noteworthy PDF document for the details.
  2. 	<li> The  <A HREF="http://blog.cloudfoundry.com/">CloudFoundry blog</a> has run two different parts with a detailed look at  what happens when you <code>push</code> applications to the CloudFoundry project. The first post details what happens from the <a href="http://blog.cloudfoundry.com/post/4737632136/what-happens-when-you-vmc-push-an-application-to-cloud">client-side perspective</a>. The second post provides details on what happens from <a href="http://blog.cloudfoundry.com/post/5223861703/how-cloud-foundry-works-when-a-new-application-is">the cloud-side perspective, once the…

Better DSL support in Groovy-Eclipse

Engineering | Andrew Eisenberg | May 09, 2011 | ...

The Groovy language is an excellent platform for creating domain specific languages (DSLs). A good DSL can make programs more concise and expressive as well as make programmers more productive. However, until now these DSLs were not directly supported by Groovy-Eclipse in the editor. When DSLs are used heavily, standard IDE features like content assist, search, hovers, and navigation lose their value. For a while now, it has been possible to write an Eclipse plugin to extend Groovy-Eclipse, but this is a heavy-weight approach that requires specific knowledge of the Eclipse APIs. Now that…

This week in Spring: May 3rd, 2011

Engineering | Josh Long | May 03, 2011 | ...

It's May, already! Seems like just yesterday we were toasting the arrival of the new year...

As they say, time flies when you're having fun! This year's been a roller coaster - exciting news and events every day - too much to keep up with, certainly!

  1. Jon Brisbin has written up an epic post introducing the CloudFoundry project and many of the technologies that you can use on it.

    This was just put up today, and is now one of my favorite blogs introducing CloudFoundry; it's so ambitious, just like CloudFoundry itself!

  2. Another masterpiece of a sample is the blog that Costin Leau wrote, Getting Started with Redis and Spring Cloud Foundry. This post is well worth reading whether you're doing CloudFoundry, Spring Data, or both. A dynamic duo, indeed!
  3. <li>European community members can learn more about Spring, Spring Data and Cloud Foundry at the S2G Forum Series: <a href="http://www.springsource.com/events/s2gforum-5-26-2011-amsterdam">Amsterdam…

Using MongoDB, Redis, Node.js, and Spring MVC in a single Cloud Foundry Application

Engineering | Jon Brisbin | May 03, 2011 | ...

Traditionally, applications have been defined by the principle technology they use. If you're building a Spring MVC application, we call it a "Java app". Since our application is primarily composed of Java components, we tend to stay in our own yards and not be terribly friendly with our neighbors until we're forced to interact with them. We set up Java-based application servers and tend to think first of going to the Java language to solve a problem in our application whether that language is the best choice or not. It has usually just been too difficult to maintain multiple sets of runtime…

Getting Started with Redis, Spring Data & Cloud Foundry

Engineering | Costin Leau | April 27, 2011 | ...

One of the drivers behind the popularity of NoSQL solutions is performance (especially) under heavy loads. Due to their data model, key value stores lead the pack, providing lightweight yet flexible means of working with data. In this entry, I am going to quickly showcase what it takes to work with a key value store (Redis) using Spring (Spring Redis) through one of Spring Data samples (RetwisJ) and deploy the app into the cloud (through Cloud Foundry) to share it with the world. I am going even further by using Windows, as a deployment platform for a change.

Redis

A popular choice among key-value stores is Redis, an open source, crazy fast database written in ANSI C weighting around 200 KB (yes, kilo-bytes) for the server or 400 KB for the entire package (includes a command-line client and some administration utilities) and available virtually on all major platforms which also makes it the choice for the sample. Note that a Redis instance is not needed unless one wants to run the sample locally. If so, for Windows users (such as the author) yours truly uses (and recommends) this pre-packed version available in both 32-bit and 64-bit flavours.

Spring and NoSQL

If you are using NoSQL from a Java environment, take a look at Spring Data: it's not a project by itself but rather an umbrella of projects embracing the various new data access technologies such as non-relational databases (like Redis or MongoDB), map-reduce frameworks (think Hadoop) and cloud-base data services for Java apps. Spring Data promotes the classic Spring values, enhancing developer productivity by removing the API noise, boiler-plate code and resource management and offering a consistent programming model. It builds on top of existing Spring features and projects (such as inversion of control, life-cycle management, type conversion, portable data access exceptions, caching and so on) so one can add it right away, with minimal effort in her application. And of course, just like the rest of the Spring projects, it is open source and available under Apache license.

Spring Data Redis

In the case of Redis, Spring Data offers dedicated support through the Spring Data Redis or simply Spring Redis project. It offers both low-level and high-level features ranging from portable Redis client abstractions (allowing different Redis clients such as Jedis, JRedis or RJC to be changed with literally one configuration line) to Redis-backed atomic collections or counters or pub-sub support. The project reference documentation covers these topics in great detail.

RetwisJ, YATC - Yet Another Twitter Clone

RetwisJ source code, including the code in this blog, can be downloaded at Spring Data Key Value sample project. Further more, documentation is available at here

RetwisJ can be seen as the Java port of Redis' Retwis sample: a simple Twitter-clone that demonstrates how one can replace expensive joins in a traditional, relational database with Redis flexible data model (such as set intersections

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