News and Events
This Week in Spring - August 21, 2012

Welcome to another installment of This Week in Spring! This roundup is put together by aggregating lots of great content from all around the web. If you have content suggestions, or if you simply want a direct line to some of the content that we post, check us out on Twitter, and Google+. As usual, we've got a lot to go over, so let's dive into it.

  1. Up first this week, there is a lot of new content available on the SpringSource Dev YouTube channel. The video from Spring Data Neo4J lead Michael Hunger's excellent webinar introducing Spring Data Neo4j is also available. The video from VMWare engineer Jerry Kuch's webinar providing an update on the new features in RabbitMQ is also available. Finally, the video from the webinar that Ken Rimple, Srini Penchikala, and I did introducing how to more fully exploit Spring Roo's interactive add-on mechanism is available.
  2. Spring Security OAuth lead Dr. David Syer has announced that Spring Security OAuth 1.0.0.RC2 is now available.
  3. Remember our pal Tobias Trelle? He's got another fantastic article that's been published on InfoQ called Spring Data - One API to Rule Them All?
  4. Stephen Chin, the Oracle JavaFX evangelist, has posted an initial blog and a slide deck on the work he's done to integrate Spring and Java FX based on a talk he's done at the Dallas Spring User Group. Nice work, Stephen! I'm looking forward to the subsequent blog posts he's promised us!
  5. Zemian Deng has a nice post on how to use the TimeMachine scheduler with Spring.
  6. The Java Code Geeks blog is at it again, this time with a post on how to measure the execution time of a method call using the Spring StopWatch class. Note that this sort of code is ideal for delivery as a AOP Aspect.
  7. René van Wijk has a nice post on how to integrate Spring's Hibernate support with the JBoss AS 7-specific integration for Hibernate.
  8. This blog looks at how to use the HibernateTemplate to work with Hibernate's lazy initialization feature. It's a nice post, but it's worth mentioning that the HibernateTemplate's no longer the preferred way of working with Hibernate. Instead, simply create a HibernateTransactionManager instance, and build a SessionFactory using the LocalSessionFactoryBean (available for both Hibernate 3 and Hibernate 4) and then you're done. For a good example, check out this sample application which demonstrates Hibernate 4. You can use the Hibernate thread-local session API (which has been available since later iterations of Hibernate 3.x). To specifically handle lazy initialization, look at Hibernate.initialize(Object).
  9. Spring's configuration support is very rich, and handily supports declaring many convenience objects. This blog introduces how to configure lists and maps using the Spring XML namespace support. Convenient!
  10. The Pables64 blog has a nice post on how to use the SpringSource Tool Suite Spring MVC template to build a Spring MVC-based web application in no time flat.
  11. This post enumerates some of the open source projects that themselves embed or rely on the Spring framework. This list is by no means comprehensive, but it is very interesting!
  12. Blogger zws1987211 has an interesting post on how to use Spring with ActiveMQ. A lot of the confusion comes from reading the ActiveMQ documentation and articles. Using Spring with JMS (and ActiveMQ in particular) is quite straight forward. JmsTemplate makes it quite simple to send and receive messages using JMS. If you want to asynchronously receive messages, then you should consider the MessageListenerContainer implementations. If you're going to use JmsTemplate to receive messages outside of a Java EE application server (which typically provide connection factory pooling), consider using the CachingConnectionFactory implementations to wrap the raw JMS connection factories. By default the JmsTemplate handles all the tedious resource acquisition and destruction logic involved in working with the JMS API. This includes shutting down connection factories and sessions, which can be expensive if the resources are actually closed, and not simply returned to a pool where they're subsequently reused. You know what I love the most about this post, though? Not only does the post articulate the correct strategies for working with Spring, but the blogger even went to the Apache Wiki's and corrected them where appropriate! Nice job, great post, and even greater initiative!
  13. Boris Lam has a nice post on using the Spring Expression language for convenient, annotation-driven security constraint declarations in Spring Security. Nice job!
  14. Blogger Brian has an introduction to building RESTful web services with Spring MVC. The post introduces how Spring's REST support builds on top of core Spring MVC.
  15. Want to see one possible approach for building a complete, secured, Spring and Struts web application, complete with objects exposed over JavaScript for asynchronous, Ajax-client-enabled communication using DWR? That blog's short on narrative, but jam-packed with code! Definitely worth a look. You're bound to find something of interest!
comments powered by Disqus