Visit our blog

News & Events

This Week in Spring, December 20th, 2011 (Holiday Edition)

Well, it's that time of the year again! The holiday season is upon us and many people will be celebrating! No matter what holiday you're celebrating (or if you're celebrating at all), let me wish you a wonderful week and the happiest of holidays. To tide you over we've packed this week's roundup to the brim. Enjoy!

  1. Santa's elves could learn a thing or two from the SpringSource engineers! Alan Stewart announced Spring Roo 1.2.0 GA on Saturday. This version of Roo has caught the attention of a lot of people. While there are many new features, some of my favorites are the multi-module Maven project support (which lets you, for example, build your model classes in a separate project from your web application), support JSF / PrimeFaces scaffolding (as opposed to just GWT, Spring MVC, Vaadin, and Flex), support for services / repositories (using Spring Data JPA and Spring Data MongoDB; this is in addition to the Active record style data-access objects already available), and (more) flexible GWT support.
  2. When Spring 3.1 was released last week, I imagine Spring Data Gemfire and Spring Data Redis lead Costin Leau hit a big red button that he had prepared for just this occasion. First, Costin released Spring Data Gemfire 1.1.0 , which has numerous features! Besides supporting Spring 3.1 (including a 3.1-compatible implementation of the Spring Cache API), Spring Data Gemfire 1.1.0 supports PDX (the binary object serialization type supported by Gemfire) attributes on the <cache/>, <client-cache/> namespace, it provides dedicated support for indices, better support for Region creation, CacheServer support, queries with variable parameters, and a MessageListenerContainer like abstraction that works with Gemfire's continuous queries (CQs). The CQ support is the basis of the GemFire inbound adapter support available in Spring Integration 2.1, due any minute now..
  3. Then, Costin released Spring Data Redis 1.0.0, a major milestone in of itself! This release, besides being compatible with Spring 3.1, supports atomic counters, a RedisTemplate, data access exception translation (consistent with the support you expect from all of Spring's data access technologies), a MessageListenerContainer abstraction that builds on Redis' pub-sub support, and much more!
  4. But Costin wasn't the only one sitting on a Spring 3.1 compatible release. Spring Social lead Craig Walls announced Spring Social 1.0.1, which, besides being Spring 3.1- and Spring Security 3.1-compatible, also provides numerous bug fixes and updates.
  5. Did you guys miss SpringOne 2GX 2011? Or, were you, like me, just not able to see all concurrent sessions because those rascally laws of physics prevented you from being in many rooms at the same time? Well, don't fret, InfoQ has recorded many sessions from the conference, and will put them up periodically.
  6. Oleg Zhurakousky, senior engineer at SpringSource and a major contributor to Spring Integration, gave an interview to InfoQ at JavaOne this year. Watch this interview as Srini Penchikala (from InfoQ) and Oleg Zhurakousky talk about messaging, Spring Integration, and cloud architectures.
  7. Greg Turnquist just announced the latest releases of Spring Python, versions 1.1.1, 1.2.1, and 1.3.0.RC1, the Pythonic implementation of the Spring framework. These are two maintenance releases and one release candidate. Great stuff!
  8. Mihai Dinca-Panaitescu has written up a quick, but concise, blog on how to configure beans using external values (property files, or external systems, all together) using Spring 3.0. Of course, Spring 3.1 now also supports the Environment abstraction, which makes retrieving properties from Java configuration a snap. So, as usual, Spring gives you choices, and in this particular case you have three different ways to cross the finish line.
  9. In the same vein, Aurelien Broszniowski has blogged on how to use Maven's property filtering to set a system property at runtime. Maven, for those of you who don't know, will automatically replace properties (of the same form as Spring's property support: ${foo}, for example) if you enable resource filtering. So, the build can be differentiated by which Maven profile is active. The result is that you get one build for one profile, and another for another profile. Another way to handle this sort of thing might be to use Spring 3.1's @Profile support.
  10. Alex Staveley has put together a blog introducing, in practically no code at all, how to use Spring's RestTemplate. There are two facets to this claim: Alex has a gift for brevity (which long time readers of this column will know I clearly do not) and RestTemplate really is that simple!
  11. Eugen Paraschiv is at it again! This time he's talking about persistence and JPA data access with Spring 3. This follows Simplifying the Data Access Layer with Spring and Java Generics and The Persistence Layer with Spring 3.1 and Hibernate. All of these are good reasons, and I wholly recommend them. One thing that should be pointed out, and Chris Beams, Spring framework committer, does point out, is that while this blog's example uses Hibernate 3, Spring 3.1 also supports Hibernate 4.
  12. Willie Wheeler has written up a blog detailing his approach to domain modeling using Neo4j and Spring Data Neo4j. Neo4J, of course, is the leading, open source graph database, and Spring Data Neo4j makes taking advantage of Neo4j, and integrating graph domain models with existing JPA domain models, a sinch. Check out this blog for a real-world example of how.
  13. The many enhancements in Spring 3.1 sure have gotten a lot of people excited. Blogger Rafal Borowiec is among them, and has put together a comprehensive enumeration of the top five new features in Spring MVC 3.1, citing the flash attributes support, improved JSR 303 validation support, form-encoded PUT requests, and Java based configuration, among others. For more, and for examples, check out the blog!
  14. Long time Spring community superstars Cake Solutions has a great blog on using Spock Extensions to simply integration testing with Spring. Definitely worth a read, so check it out!
  15. Have you read Jim Webber's seminal REST in Practice? The book describes, among other things, how to use REST. That is, it's one thing to think of REST as being an HTTP-centric RPC mechanism, but to really grok it is something else entirely. On this subject, I can recommend no finer reference than Jim's book and of course Roy Fielding's original work. In Jim's book, however, he establishes an example of an automated coffee shop, RestBucks, which exposes an API. (This example itself is a twist on the example established in the simialarly seminal Patterns of Enterprise Architecture) It's a wonderful book, a fantastic example, and, more to the point, it makes perfect fodder for blogger "Furious Bob" to demonstrate a cleanly architected application using Spring 3.1's enhanced REST support.
  16. Tobias Flohre has put together a rather inspired post on using Spring (and @Configurable) together with SWT, the UI toolkit used to build such popular applications as Eclipse and SpringSource's very own SpringSource Tool Suite.
  17. GWT 2.4 surfaced the RequestFactory SPI, which is a framework SPI for the Service Locator pattern. So, blogger imrabti has details how to wire Spring as the service locator for your GWT applications. Naturally. There were actually a couple of blogs along this thread this week, but I saw this one first and the recipe is fundamentally the same.
  18. Jasypt, a simplified encryption library that integrates naturally with Spring and Spring Security, has just released Jasypt version 1.9.0. Check out the What's New section for the lowdown on the new features. Of particular interest to the Spring developer of late? The 3.1 support!
  19. Blogger and Spring Roo 1.1 Cookbook author Ashish Sarin has written a blog on how to add JSON support to domain entities and controllers using Spring Roo. Nice job, Ashish!
  20. Spring in Practice author and blogger Willie Wheeler has written a blog that would've helped me just the other week! In the blog, Willie describes how to enable Jackson (a JSON serialization library) to use JAXB2 (an XML serialization standard with several implementations) annotations with the Spring OXM library. Spring, of course, provides the Spring object-to-XML (or, OXM) module as part of its core. The inspiration is that, if you want to generate RESTful views of your entities, you need to use something like JAXB for the XML view and Jackson for the JSON view. If you want to configure the mapping from Java object to another serialization, you usually annotate the Java object with annotations, which yeilds domain entities with redundant mapping annotations (one for JSON, one for XML!). Well, now you can use the same JAXB2 annotations for both purposes. Now, if we could just reduce the redundancies between JAXB and JPA...
  21. Self described "Spring afficianado" (he certainly seems like one to me!) Shekhar Gulati has written about how he bootstrapped a proof-of-concept using Spring Roo and then added support for MongoDB replica sets using Spring Data MongoDB. The blog shows the Spring Roo commands and the Spring Data MongoDB integration in detail.
  22. Shekhar has got another post worthy of inclusion this week on how to use Spring Roo to deploy an application against JBoss 7 (leveraging a javax.sql.DataSource configured in JBoss). Short and simple, as is the Roo way.
  23. Gee, there's lots of GWT represented in this week's roundup! Frank Hinkel has contributed a blog about using Spring as the REST endpoint to a GWT client. To keep things interesting (if a bit odd!), he even uses a CDI security library through a Spring-CDI bridge on top of Spring to secure the Spring controller. He goes through the nitty gritty detail of how the development workflow works for a particular, open source application he's building called "openKanban."
  24. The Java Code Geeks have a blog that details how to use a BeanPostProcessor to systematically inject SL4J Logger for any field that has a @Log annotation on it. This post is memorable for many reasons: one, it's useful! Additionally, it demonstrates how easy it is to have the container handle situations that it doesn't already know how to handle without waiting for a new release. Remember, the very large majority of the Spring framework APIs are built on the same SPIs that are extended for everyday users!

That's it for this week! Happy holidays, and c'ya next week!

 

Newsletter Subscription

Our monthly newsletter is packed full of techniques, tutorials, tips and tricks to get you on your way to Spring nirvana. View Archive

Upcoming Training