This Week in Spring - April 3rd, 2012

Engineering | Josh Long | April 03, 2012 | ...

Welcome to another Installment of This Week in Spring The Cloud Foundry Open Tour is well underway, and have been thus far very good events to attract community.

There are still some (well, there were yesterday!) early bird spots in the upcoming shows in <a href = "">Austin</A>, <a href = "">Washington D.C.</a>, <a href = "">Kiev</A>, <a href = "">Moscow</A>, and <a href  = "">London</A>, so book now. 

  1. Some of the wonderful content from the Spring I/O conference is now available online! The conference, held in Spain in February of this year, is conducted in both Spanish and English, so there's a lot to like no matter which language you speak. Adrian Colyer's keynote session is super, once you get past the audio problems at the beginning. I couldn't find a SpringIO-specific hash tag, but you can pick them out of the other videos pretty easily by scrolling down. Stay tuned, there should be even more content posted, soon.
  2.  <LI> Tobias Fiohre (who  seemingly lives  <EM>only</Em> to please us, the lucky developers in the  Spring community!)  has put up the third installment of his blogs  on <a href = "">Spring Batch and transactions</A>. 
    	The first <a href = "">one introduced the basics</A>, and the <A href ="">second one introduced restart and cursor-based readers and writers</A>.
     <LI> The Cake Solutions gang has two wonderful posts on the nuances of using  <a href = "">Spring Data Neo4j from Scala</A>.  Confusingly, there is a subsequent blog, called <a href = "">Spring Data Neo4j and MongoDB</A> which has more to do with how to write a domain model using the Spring Data Neo4J and MongoDB annotations together, in Scala, than on how to actually use Spring Data MongoDB. But, knowing them, I trust that just means we'll have something wonderful to look forward to next week! </LI>
    		<li> The NovoJ blog has a great look <a href = "">at composing custom security annotations in Spring Security</a> with a bit of <em>help</EM>. </LI>
    <LI> I've had a few people ask me how to modularly turn on runtime features exposed as aspects in Spring. The answer's usually  <a href = "">to conditionally enable or  disable the feature at the proxy or aspect level</A>, as described in this StackOverflow post.  For extra points, you might <a href = "">wire that property up to JMX</a> so that it can be easily changed from an operations console.   </LI>
    	Blogger Eren   has an interesting post explaining how to integrate <a href = "">JSF 2.1, Hibernate 4.1.0, Primefaces 3.1.1, Tomcat 7.0, and Spring 3.1.1</A>. It's got a lot of the moving parts correctly lined up, which is nice, and a testament to how far Spring can take you. But, I would suggest a few updates: first, you can use Spring to manage your JSF beans with the <a href = ""><CODE>SpringBeanFacesELResolver</CODE></a>, making them fully managed components in Spring, and giving them access to all the benefits other Spring components benefit from.  
    	 Additionally, I'd  probably use Java-style configuration, and avoid the extra layering imposed by having a DAO and a Service, which essentially just delegates to the DAO. These are, of course, just a matter of taste. Either way, good post! 
    <LI> The <a href = "">VoltDB</A> blog has a fantastic post on how to  integrate VoltDB - an in-memory distributed database - with the Spring framework. The blog sketches the outlines of a simple Spring integration. I'd recommend wrapping up the client creation login in a <CODE>FactoryBean</CODE>, which would let  people inject the <CODE>Client</CODE> directly. That said, this is a cool look at a cool technology. </LI>
  3. The Java Revisited blog has a great look at how to limit the number of sessions in an application from Spring Security, which is the first point of entry in secured Spring applications.
  4. <LI>The Safari books blog has an interesting tip about using <a href = "">JSON views from Spring MVC controllers</A>. The tip is over-specific, however. If you're using Spring MVC 3, or Spring 3.1, you don't need to actually use that configuration. You can simply setup a simple Spring MVC <CODE>@Controller</CODE> class with a method annotated with <CODE>@ResponseBody</CODE> on the return type  and - assuming your requests have an <CODE>Accept</CODE> header (<CODE>Accept: application/json</CODE>) in the request, and that you have Jackson (for JSON), or JAXB (for XML) on the class path  - then the response will be a JSON response.
    	<LI>  Blogger Duck Ranger has an amazing post on the nitty gritty of <a href = "">what the  Spring <CODE>DispatcherServlet</CODE> does as the core  of Spring's web machinery</A>. Great post, and worth a read. So is <a href = "">her previous post  introducing Spring Source Tool Suite, from last year</a>. 
    		<LI> Blogger Tomasz Nurkiewicz  has a great post that explains how to <a href = "">setup a <CODE>JDBCJobStore</CODE> with Spring and Quartz</A>, the job scheduling engine.
    			 <LI> The Java Code Geeks blog has a great roundup of the <a href = "">various remoting technologies supported by Spring</a>, including RMI, the HTTP Invoker, Hessian, Burlap, JAX-WS, JMS, and JAX-RPC complete with example RMI code.  
    				 Developers who like the remoting  hierarchies in Spring core might also be interested in my repository on GitHub that I created several months ago to  <a href = "">demonstrate how to provide Spring <CODE>ServiceExporter</CODE> and marshalling <code>HttpMessageConverter</CODE></a> (so that you can use these marshalling technologies with Spring MVC's REST support) implementations for Avro, Thrift, MessagePack, and Google Protocol Buffers, among others. 
    			<LI> Using Java FX? You'll need to secure it to do anything useful in a large deployment. The ZenJava explains <a href = "">how to use Spring Security to secure your Java FX applications</a>. </LI>  

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